Installation
httpx>=0.27.0, websockets>=12.0
Overview
The Python SDK is fully async and provides the same modules as the TypeScript SDK:| Module | Access | Purpose |
|---|---|---|
| Sandbox | Sandbox.create() | Create, connect to, and manage sandboxes |
| Commands | sandbox.commands | Execute shell commands |
| Filesystem | sandbox.files | Read, write, and manage files |
| PTY | sandbox.pty | Interactive terminal sessions |
| Templates | Template(api_url, api_key) | Build and manage container templates |
Quick Example
All SDK operations are async. Call
await sandbox.kill() to stop the sandbox and await sandbox.close() to clean up the HTTP client.