Metadata-Version: 2.4
Name: wbxsandbox
Version: 0.15.2
Summary: Python SDK for WBX Sandbox – isolated cloud sandboxes (Firecracker microVMs) for AI agents
Author: KXCOMM s.r.o.
License-Expression: MIT
Project-URL: Homepage, https://sandbox.wbx.cz
Project-URL: Documentation, https://sandbox.wbx.cz/docs
Project-URL: Pricing, https://sandbox.wbx.cz/pricing
Keywords: sandbox,firecracker,microvm,ai agents,code execution,wbx
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# WBX Sandbox – Python SDK

Python SDK for [WBX Sandbox](https://sandbox.wbx.cz): isolated cloud sandboxes for AI agents
and code execution. Each sandbox is a Firecracker microVM with its own Linux kernel, disk and
network rules. No dependencies – only the Python standard library (Python 3.9+).

## Install

    pip install wbxsandbox

## Configure

Create an API key in the portal (API keys) and set it in the environment:

    export WBXSANDBOX_API_KEY=...
    # optional, defaults to https://sandbox.wbx.cz
    export WBXSANDBOX_URL=https://sandbox.wbx.cz

Both can also be passed as `url=` and `api_key=` arguments.

## Quick start

```python
from wbxsandbox import Sandbox

with Sandbox.create(template="base", timeout=300) as sb:
    r = sb.run("python3 -c 'print(1 + 1)'")
    print(r.exit_code, r.stdout)          # 0 "2\n"
    sb.files.write("/home/user/data.txt", "hello")
    print(sb.files.read_text("/home/user/data.txt"))
# the sandbox is destroyed when the block ends
```

Background jobs and batches:

```python
from wbxsandbox import run_job

job = run_job(command="python3 -c 'print(42)'", template="base", timeout_seconds=600)
job.wait()
print(job.summary()["status"])
```

Interactive terminal in a running sandbox (installed as the `wbx` command):

    wbx connect sb_...

Documentation: https://sandbox.wbx.cz/docs · Pricing: https://sandbox.wbx.cz/pricing

## Versioning

The SDK has its own version. Its `major.minor` follows the platform release line
(SDK 0.15.x works with platform 0.15.x); the patch number is raised only when the SDK
itself changes. `pyproject.toml` and `wbxsandbox.__version__` always carry the same
version (checked by `tests/test_sdk.py`).

## Tests

    cd sdk/python && python3 -m unittest discover -s tests

The tests do not need network access.

## License

MIT – see `LICENSE`.
