Metadata-Version: 2.5
Name: brezel-sdk
Version: 0.1.1
Summary: Python SDK for stateful, self-hosted Brezel agent sandboxes
Project-URL: Documentation, https://github.com/infercrane/brezel#python-and-typescript-sdks
Project-URL: Issues, https://github.com/infercrane/brezel/issues
Project-URL: Repository, https://github.com/infercrane/brezel
Author: InferCrane
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agents,firecracker,microvm,sandbox,self-hosted
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Brezel Python SDK

Dependency-free Python client for stateful, self-hosted Brezel agent sandboxes.

```bash
pip install brezel-sdk
```

```python
from brezel import BrezelClient

client = BrezelClient.from_token_file(
    "/var/lib/brezel/secrets/service.token",
    base_url="https://sandbox.example.com",
    project="brezel-default",
)

with client.create_sandbox(template="base", ttl_seconds=900) as sandbox:
    result = sandbox.run(["python3", "-c", "print(6 * 7)"])
    print(result.stdout_text, end="")
```

Use a prequalified immutable environment without creating or resolving a
template alias:

```python
with client.create_sandbox(
    environment_revision="envr_0123456789abcdef01234567",
    ttl_seconds=900,
) as sandbox:
    print(sandbox.run(["node", "--version"]).stdout_text)
```

The SDK intentionally accepts command argument arrays, not shell strings. It
does not retry commands or file writes because their outcome can be
indeterminate after a transport interruption.

Requires Python 3.10 or newer.
