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 | sandbox.templates | Build and manage container templates |
Quick Example
All SDK operations are async. Use
async with for automatic cleanup, or call await sandbox.kill() manually.