The Daytona Python SDK is the official Python library for Daytona, an open-source, secure, and elastic infrastructure for running AI-generated code. It provides interfaces for managing sandboxes (isolated execution environments), file system operations, Git operations, language server protocol support, and process and code execution. The library is actively maintained and currently at version 0.166.0, with regular updates. [1, 13]
pip install daytona-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Daytona SDK, create an isolated sandbox environment, execute Python code within it, and then clean up the sandbox. Ensure your `DAYTONA_API_KEY` is set as an environment variable or passed directly to `DaytonaConfig`. [3, 6, 13]
Upgrade to v0.21.0+ and update sandbox creation calls to use `CreateSandboxFromSnapshotParams` for declarative provisioning, and configure resources via snapshots. Consult the official migration guide for details. [2]
When creating sandboxes, ensure resources are specified within the `CreateSandboxFromSnapshotParams` or other snapshot-related configurations. Direct `SandboxResources` configuration is deprecated. [2]
Use `sandbox.delete()` for cleanup operations. Refer to the updated SDK documentation for current object structures and method calls. [2]
Consider upgrading to v0.21.0 or newer to benefit from the Apache 2.0 license, which offers more flexibility for integration. [19]
No dependency data recorded yet.