Metadata-Version: 2.5
Name: groundbox
Version: 0.2.0
Summary: Python SDK for the Groundbox API: sandboxes and CI runners for your agents
Project-URL: Homepage, https://groundbox.dev
Project-URL: Documentation, https://groundbox.dev/docs
Author-email: Groundbox <contact@groundbox.dev>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ci,groundbox,sandbox,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
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: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# groundbox

The Python client for the Groundbox API: sandboxes and CI runners for your agents.

```sh
pip install groundbox
```

## Quickstart

```python
from groundbox import Groundbox
gb = Groundbox()  # reads GROUNDBOX_API_KEY
sandbox = gb.create_sandbox(cpus=2)
print(gb.run_command(sandbox["id"], "uname -a")["stdout"])
gb.delete_sandbox(sandbox["id"])
```

A failed call raises `GroundboxError` with the API's `code`, `status` and `request_id`. Python 3.9 or newer, standard library only.

## Templates and volumes

A template is a ready-made disk (an image, a Dockerfile or a list of packages) built once. Sandboxes of the template's exact size start from its warm snapshot in well under a second.

```python
gb.create_template("python-ml", image="python:3.12-slim", pip=["numpy", "pandas"])
for line in gb.follow_template_logs("python-ml", 1):
    print(line["text"])
gb.create_volume(10, name="data")
sandbox = gb.create_sandbox(template="python-ml", volumes=[{"volume": "data", "path": "/data"}])
```

Docs: https://groundbox.dev/docs
