Prerequisites
Before you begin, make sure you have:- A Daytona account (sign up here)
- An API key (create one)
- Python, Node.js, Go, or Ruby installed
Create your first sandbox
1
Install the SDK
Choose your preferred language and install the Daytona SDK:
2
Set your API key
Set your API key as an environment variable:
3
Create and run a sandbox
Create a simple program that creates a sandbox and runs code inside it:
- Python
- TypeScript
- Go
- Ruby
4
Run your program
Execute your program and you’ll see the output:
Congratulations! You’ve successfully created your first Daytona sandbox and executed code inside it.
What just happened?
Let’s break down what your program did:- Initialized the client - Connected to the Daytona API using your API key
- Created a sandbox - Launched an isolated execution environment in under 90ms
- Executed code - Ran Python code safely inside the sandbox
- Retrieved output - Got the results back to your application
- Cleaned up - Deleted the sandbox to free up resources
Next steps
Explore file operations
Upload, download, and manage files in your sandbox
Git operations
Clone repositories and manage Git workflows
Process management
Execute commands and manage processes
Language Server Protocol
Add code intelligence with LSP support