Metadata-Version: 2.4
Name: boxrouter
Version: 0.0.1a2
Summary: Python client for creating and managing BoxRouter cloud sandboxes
License-Expression: LicenseRef-PolyForm-Shield-1.0.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Requires-Dist: httpx>=0.27,<1
Requires-Python: >=3.11
Project-URL: Homepage, https://boxrouter.ai
Description-Content-Type: text/markdown

# BoxRouter Python SDK — alpha

BoxRouter is a Python client for the BoxRouter API. It creates temporary cloud
sandboxes, runs commands in them, reads their status, and requests their deletion.
A sandbox request can name eligible cloud providers; BoxRouter evaluates the
request and routes it to a provider that can satisfy it.

Requires Python 3.11 or later and a BoxRouter API key.

```sh
python -m pip install --pre boxrouter
```

Set `BOXROUTER_API_KEY` in your environment. The client uses
`https://boxrouter.ai/api/v1` by default; set `BOXROUTER_BASE_URL` to use another
deployment.

```python
from boxrouter import BoxRouter

with BoxRouter() as client:
    with client.sandboxes.create(
        providers=["e2b", "modal"], lifetime_seconds=600
    ) as sandbox:
        result = sandbox.exec("python --version")
        print(result.stdout, end="")
        print(sandbox.get()["state"])
```

The `providers` argument is an allowlist: BoxRouter routes only among the named
providers that meet the sandbox requirements. The client does not retry a
mutation automatically. If a request outcome is uncertain, `BoxRouterError`
exposes its `idempotency_key` so the same operation can be reconciled safely.

This alpha includes sandbox creation, command execution, status reads, and
sandbox deletion. Its API may change before the full SDK release.

Licensed under PolyForm Shield 1.0.0; see [LICENSE](LICENSE). Contact:
maintainer@boxrouter.ai.
