Getting Started
The Daytona SDK provides official Python and TypeScript interfaces for interacting with Daytona, enabling you to programmatically manage development environments and execute code.
Prerequisites
To use the Daytona SDK, ensure you have the following:
- Python 3.7+ or Node.js 14+ installed
- A Daytona server instance
- API key for authentication (if required)
Installation
Daytona provides two methods for installing the SDK: pip
for Python and npm
, yarn
, or pnpm
for TypeScript/JavaScript. Choose the appropriate method based on your preferred language.
Python Installation
To install the Daytona SDK for Python, run the following command:
TypeScript/JavaScript Installation
To install the Daytona SDK for TypeScript or JavaScript, run the following command:
Quick Start
Daytona SDK provides a simple and intuitive interface for interacting with Daytona. Here are a quick examples to get you started:
Python Example
Python example using the Daytona SDK, showing how to create a workspace, run some code, and clean up afterwards:
TypeScript Example
TypeScript example using the Daytona SDK, showing how to create a workspace, run some code, and clean up afterwards:
Environment Variables
The SDK looks for these environment variables:
DAYTONA_API_KEY
- Your Daytona API key.DAYTONA_SERVER_URL
- URL of your Daytona server.DAYTONA_TARGET
- Target environment. Defaults tolocal
.
You can set these in a .env
file:
Core Features
The SDK provides several key features:
-
🚀 Workspace Management
Create, manage, and remove development environments.
-
📂 File System Operations
Full file system access and management.
-
🔄 Git Integration
Built-in Git operations support.
-
âš¡ Process Execution
Run commands and code in isolated development environments.
-
🔧 LSP Support
Language Server Protocol integration.
Next Steps
- Learn about Configuration options.
- Explore Workspace Management.
- See File System Operations.
- Check out Git Operations.
- Understand Process & Code Execution.
- Learn about LSP Support.