Daytona Documentation
The Daytona SDK provides official Python and TypeScript interfaces for interacting with Daytona, enabling you to programmatically manage development environments and execute code.
Quick Start
pip install daytona_sdk
from daytona_sdk import Daytona, DaytonaConfig
# Define the configurationconfig = DaytonaConfig( api_key="your-api-key", server_url="your-server-url", target="us")
# Initialize the Daytona clientdaytona = Daytona(config)
# Create the Sandbox instanceworkspace = daytona.create()
# Run the code securely inside the Sandboxresponse = workspace.process.code_run('print("Hello World from code!")')if response.exit_code != 0: print(f"Error: {response.exit_code} {response.result}")else: print(response.result)
daytona.remove(workspace)
npm install @daytonaio/sdk
import { Daytona } from '@daytonaio/sdk';
// Initialize the Daytona clientconst daytona = new Daytona({ apiKey: 'your-api-key', serverUrl: 'your-server-url', target: 'us'});
// Create the Sandbox instanceconst workspace = await daytona.create({ language: 'typescript',});
// Run the code securely inside the Sandboxconst response = await workspace.process.codeRun('console.log("Hello World from code!")')console.log(response.result);
About
- Getting Started
Learn about Daytona SDK and how it can help you manage your development environments. - Configuration
Get started with Daytona SDK and learn how to use and configure your development environments. - Sandbox Persistence
Learn about sandbox persistence and how it can help you manage your development environments.
Python SDK
- Management
Learn about the management features of the Daytona SDK. - File System
Learn about the file system features of the Daytona SDK. - Git Operations
Learn about the git features of the Daytona SDK. - Language Server Protocol
Learn about the language server protocol features of the Daytona SDK. - Process & Code Execution
Learn about the process and code execution features of the Daytona SDK. - Sandbox
Learn about the sandbox features of the Daytona SDK.
TypeScript SDK
- Management
Learn about the management features of the TypeScript Daytona SDK. - File System
Learn about the file system features of the TypeScript Daytona SDK. - Git Operations
Learn about the git features of the TypeScript Daytona SDK. - Language Server Protocol
Learn about the language server protocol features of the TypeScript Daytona SDK. - Process & Code Execution
Learn about the process and code execution features of the TypeScript Daytona SDK. - Sandbox
Learn about the sandbox features of the TypeScript Daytona SDK.