Python SDK
Install and configure rlp-sdk.
The Python SDK is published as rlp-sdk and imported as the rlp module. It mirrors the official Daytona SDK's Python surface (class names, method names, error types), so most Daytona code ports by changing the import.
Install
Configure
Construct a Daytona client with an optional DaytonaConfig. Every field falls back to environment variables — an explicit config value wins, then RLP_*, then DAYTONA_* where a fallback exists.
| Field | Type | Default | Resolution order |
|---|---|---|---|
api_url | str | — (required) | config.api_url → RLP_API_URL → DAYTONA_API_URL |
api_key | str | — (required) | config.api_key → RLP_API_KEY → DAYTONA_API_KEY |
toolbox_url | str | None | config.toolbox_url → RLP_TOOLBOX_URL → the sandbox DTO's toolboxProxyUrl |
target | str | "local" | config.target → RLP_TARGET → DAYTONA_TARGET → "local" |
Constructing the client raises DaytonaValidationError if no API URL can be resolved, and DaytonaAuthenticationError if no API key can be resolved. If no toolbox URL is available from any source, sandbox operations that need it raise DaytonaValidationError at that point.
Quick example
Create a sandbox, run a command in it, then delete it:
See the quickstart for a longer walkthrough.
Reference pages
- Daytona (client) — sandbox CRUD, lifecycle helpers, service accessors
- Sandbox — lifecycle, fork, previews, VM-state snapshots
- Process — command execution, code runs, sessions
- FileSystem — file operations inside the sandbox
- Git — git operations inside the sandbox
- SnapshotService — image aliases and Dockerfile builds
- VolumeService — persistent volumes
- ObjectStoreService — S3-compatible bucket mounts
- SecretService — project secrets
- Errors — the exception hierarchy