Metadata-Version: 2.4
Name: boxcompute
Version: 0.2.0
Summary: Official Python SDK for the BoxCompute public API
Author: BoxCompute
License-Expression: MIT
Project-URL: Documentation, https://boxcompute.ai/docs
Project-URL: Issues, https://github.com/boxcompute/sdk/issues
Project-URL: Repository, https://github.com/boxcompute/sdk
Keywords: boxcompute,sandbox,ai-agent,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
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: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.8
Provides-Extra: test
Requires-Dist: build<2,>=1.2; extra == "test"
Requires-Dist: datamodel-code-generator[http]<1,>=0.33; extra == "test"
Requires-Dist: mypy<3,>=1.14; extra == "test"
Requires-Dist: pytest<10,>=9.0.3; extra == "test"
Requires-Dist: pytest-asyncio<2,>=0.25; extra == "test"
Requires-Dist: ruff<1,>=0.11; extra == "test"
Dynamic: license-file

# `boxcompute`

Official Python SDK for the BoxCompute public API, with synchronous and
asynchronous clients.

```bash
pip install boxcompute
```

## Synchronous client

```python
import os
from boxcompute import BoxCompute

with BoxCompute(api_key=os.environ["BOXCOMPUTE_API_KEY"]) as boxcompute:
    workspaces = boxcompute.workspaces.list()
    workspace = (
        workspaces[0]
        if workspaces
        else boxcompute.workspaces.create(
            name="SDK quickstart",
            idempotency_key="sdk-quickstart-workspace-v1",
        )
    )
    sandbox = boxcompute.sandboxes.create(workspace_id=workspace.id)
    try:
        result = boxcompute.sandboxes.execute(
            sandbox.id,
            argv=["python3", "-c", "print('hello')"],
        )
        print(result.stdout, end="")
    finally:
        boxcompute.sandboxes.delete(sandbox.id)
```

## Asynchronous client

```python
import os
from boxcompute import AsyncBoxCompute

async with AsyncBoxCompute(api_key=os.environ["BOXCOMPUTE_API_KEY"]) as boxcompute:
    workspaces = await boxcompute.workspaces.list()
```

The SDK includes workspaces, Sandboxes, synchronous execution, durable
operations, logs, binary-safe file operations, usage, typed Pydantic models,
structured errors, configurable timeouts, and injectable `httpx` clients.

API keys are secrets. Use this package from trusted server-side code and never
include a `bc_live_...` key in a browser or mobile application.
