SDK Overview
Native Python and TypeScript SDKs with a Daytona-compatible interface.
Daytona ships two first-party SDKs for driving sandboxes programmatically: a Python package and a TypeScript package. Both are thin, typed clients over the same control-plane API and the in-sandbox toolbox, and both follow the official Daytona SDK's public surface — same class names, same process / fs / git layout on the sandbox handle, same error hierarchy — so existing Daytona-oriented code is a near drop-in. See Daytona compatibility for the full mapping.
Install
The Python module is imported as rlp; the TypeScript package as @rlp/sdk. Both export a top-level Daytona client class.
Configuration
Each setting resolves in the same order in both SDKs: an explicit config value wins, then the RLP_* environment variable, then the DAYTONA_* fallback where one exists.
| Setting | Python config | TypeScript config | Environment variables |
|---|---|---|---|
| API URL | api_url | apiUrl | RLP_API_URL, then DAYTONA_API_URL |
| API key | api_key | apiKey | RLP_API_KEY, then DAYTONA_API_KEY |
| Toolbox URL | toolbox_url | toolboxUrl | RLP_TOOLBOX_URL |
| Target | target | target | RLP_TARGET, then DAYTONA_TARGET (default local) |
API keys are bearer tokens prefixed rlp_ — see Authentication. The client raises/throws at construction if the API URL or key cannot be resolved.
Native capabilities
Beyond the Daytona-compatible surface, both SDKs expose platform-native features:
- Scheduling mode —
burstable(default) ordedicated(guide) - Persistent sandboxes — warm
stop()/start()backed by a durable write layer (guide) - Spot tier — discounted, reclaimable sandboxes (guide)
- Fractional CPU — e.g.
cpu=0.5on burstable sandboxes - Ports — declare exposed ports at create time, or expose them later via preview endpoints (guide)
- Docker device — a dedicated
/var/lib/dockerscratch device (guide) - Volumes — persistent, shareable directory trees (guide)
- Object stores — FUSE-mounted S3-compatible buckets (guide)
- Secrets — egress-proxy-substituted project secrets (guide)
- VM-state snapshots — real disk or memory+disk capture of a running sandbox (guide)
- Fork — duplicate a persistent sandbox, RAM and filesystem included (guide)
Note: Known limitations.
resources.memory/resources.diskandlabelsare sent by the SDKs but not applied by the API yet — onlyresources.cpumaps today. To size memory or disk, use the REST API'smem_mib/scratch_mibfields directly.regionis REST-only as well. See sandbox parameters.
Reference
- Python SDK reference —
rlp-sdk: client, sandbox, process, filesystem, git, snapshots, volumes, object stores, secrets, errors. - TypeScript SDK reference —
@rlp/sdk: the same surface with camelCase naming andasync/awaitthroughout.