Metadata-Version: 2.4
Name: mosaic-sandbox
Version: 0.1.0
Summary: Python SDK for Mosaic Sandbox (MAR)
Author: Mosaic
License: Proprietary
Project-URL: Homepage, https://sandbox.mosaicos.com
Project-URL: Documentation, https://sandbox.mosaicos.com/docs/
Project-URL: Repository, https://github.com/nitinrao/Mosaic-Sandbox
Project-URL: Issues, https://github.com/nitinrao/Mosaic-Sandbox/issues
Keywords: sandbox,firecracker,microvm,agent,cli,mcp,ssh
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Mosaic Sandbox Python SDK

`mosaic-sandbox` is the Python SDK and CLI for Mosaic Sandbox, a Firecracker-based
runtime for coding agents.

Install:

```bash
python -m pip install mosaic-sandbox
```

Set your endpoint and API token:

```bash
export MAR_ENDPOINT=https://sandbox.mosaicos.com
export MAR_API_TOKEN=msk_live_...
```

Run the CLI smoke test:

```bash
mar doctor
mar run --template node-20 node -v
```

Python example:

```python
from mosaic_sandbox import Sandbox

sbx = Sandbox.create(
    template="node-20",
    endpoint="https://sandbox.mosaicos.com",
    api_token="msk_live_..."
)

try:
    result = sbx.run_command("node -v")
    print(result.stdout)
    print(result.tti_ms)
finally:
    sbx.destroy()
```

Docs: <https://sandbox.mosaicos.com/docs/>
