Requirements
You also need a Declaw API key. Sign up at declaw.ai to use Declaw Cloud, or see the Deployment overview for enterprise on-prem options.
Install
- Python
- TypeScript
- Go
Sandbox) and asynchronous (AsyncSandbox) clients, along with all security policy types and model classes.To install a specific version:pyproject.toml project:Configuration
The SDK connects to a Declaw API server. You configure the connection either through environment variables (recommended) or programmatically viaConnectionConfig.
Environment variables
When these variables are set, you can call
Sandbox.create() without any arguments:
- Python
- TypeScript
- Go
Explicit ConnectionConfig
Pass aConnectionConfig directly when you need multiple connections, non-standard ports, or explicit control over credentials:
- Python
- TypeScript
- Go
Timeout
Thetimeout parameter on Sandbox.create() sets the maximum lifetime of the sandbox in seconds. If the sandbox is not killed before the timeout, the server destroys it automatically. The default is 300 seconds (5 minutes).
Verify your setup
After installing the SDK and setting your environment variables, run a quick smoke test:- Python
- TypeScript
- Go
Common errors
Next steps
- Quickstart — five-minute tutorial covering sandboxes, commands, filesystem, and security policies
- Deployment overview — stand up a Declaw server on GCP, AWS, Docker, or bare metal
- Python SDK reference — full API reference for the Python client
- TypeScript SDK reference — full API reference for the TypeScript client
- Go SDK reference — full API reference for the Go client