DaytonaDocs

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

Python
pip install rlp-sdk
TypeScript
npm install @rlp/sdk

The Python module is imported as rlp; the TypeScript package as @rlp/sdk. Both export a top-level Daytona client class.

Python
from rlp import Daytona
 
daytona = Daytona()
TypeScript
import { Daytona } from '@rlp/sdk'
 
const daytona = new Daytona()

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.

SettingPython configTypeScript configEnvironment variables
API URLapi_urlapiUrlRLP_API_URL, then DAYTONA_API_URL
API keyapi_keyapiKeyRLP_API_KEY, then DAYTONA_API_KEY
Toolbox URLtoolbox_urltoolboxUrlRLP_TOOLBOX_URL
TargettargettargetRLP_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 modeburstable (default) or dedicated (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.5 on burstable sandboxes
  • Ports — declare exposed ports at create time, or expose them later via preview endpoints (guide)
  • Docker device — a dedicated /var/lib/docker scratch 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.disk and labels are sent by the SDKs but not applied by the API yet — only resources.cpu maps today. To size memory or disk, use the REST API's mem_mib / scratch_mib fields directly. region is REST-only as well. See sandbox parameters.

Reference

  • Python SDK referencerlp-sdk: client, sandbox, process, filesystem, git, snapshots, volumes, object stores, secrets, errors.
  • TypeScript SDK reference@rlp/sdk: the same surface with camelCase naming and async/await throughout.

On this page