Registry / devops / daytona-api-client-async

daytona-api-client-async

JSON →
library0.207.0pypypi✓ verified 27d ago

The `daytona-api-client-async` library provides an asynchronous Python client for interacting with the Daytona platform. Daytona offers a secure and elastic infrastructure for running AI-generated code within isolated development environments called sandboxes. This client enables programmatic management of these sandboxes, including creation, code execution, and lifecycle operations. The library is part of the larger Daytona SDK ecosystem, which receives frequent updates, often multiple times a week.

pip install daytona-api-client-async
INSTALL
IMPORT
SIG · DAYTONA-API-CLIENT
D
daytona-api-client-async
devopspythonv0.207.0
Install
6.1s avg
Import
385ms
Disk
43MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.207.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.404s · 42.5MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 6.1s · import 0.366s · 44MB
43MB installed
● package 43MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AccountProvider
✓ from daytona_api_client_async import AccountProvider
✗ from daytona_api_client_async import AsyncDaytona
ApiClient
✓ from daytona_api_client_async import ApiClient
✗ from daytona_api_client_async import AsyncDaytona
AdminApi
✓ from daytona_api_client_async import AdminApi
✗ from daytona_api_client_async import AsyncDaytona

This quickstart demonstrates how to initialize the asynchronous Daytona client, create a sandbox, execute a simple command within it, and then delete the sandbox. It assumes `DAYTONA_API_KEY` is set as an environment variable or passed explicitly.

import asyncio import os from daytona import AsyncDaytona, DaytonaConfig async def main(): # API key can also be set via DAYTONA_API_KEY environment variable # For this example, we fetch it from env or use a placeholder if not set. api_key = os.environ.get('DAYTONA_API_KEY', 'YOUR_API_KEY_HERE') if api_key == 'YOUR_API_KEY_HERE': print("WARNING: DAYTONA_API_KEY environment variable not set. Using placeholder.") config = DaytonaConfig(api_key=api_key) try: async with AsyncDaytona(config) as daytona: # Create a new sandbox print("Creating a new Daytona sandbox...") sandbox = await daytona.create() print(f"Sandbox '{sandbox.name}' created with ID: {sandbox.id}") # Execute a command in the sandbox command = "echo 'Hello from Daytona Sandbox!'" print(f"Executing command: '{command}'...") response = await sandbox.process.exec(command) print("Command output:") print(response.result) # Clean up: delete the sandbox print(f"Deleting sandbox '{sandbox.name}'...") await daytona.delete(sandbox.id) print(f"Sandbox '{sandbox.name}' deleted.") except Exception as e: print(f"An error occurred: {e}") if __name__ == "__main__": asyncio.run(main())
Debug
Known issues
breakingMajor breaking changes were introduced in v0.21.0 (released January 15, 2026). This update refactored the architecture around 'snapshots' instead of legacy pre-built images. Key changes include new parameter types for sandbox creation, a new `SnapshotService`, removal of deprecated Sandbox methods, and flattening of Sandbox instance information. Users on `v0.20.2` or earlier must update their integration.
fix
Refer to the official migration guide for v0.21.0. Update sandbox creation parameters (`CreateSandboxParams` is now split), utilize the new `SnapshotService`, and adjust for flattened Sandbox object properties.
affects: <=0.20.2
gotchaThe PyPI package `daytona-api-client-async` is a low-level API client. However, the high-level Python SDK, which includes asynchronous capabilities, is typically installed via `pip install daytona` and its main classes (`AsyncDaytona`, `DaytonaConfig`) are imported from the `daytona` namespace. Direct installation of `daytona-api-client-async` may lead to incorrect import attempts like `from daytona_api_client_async import AsyncDaytona`.
fix
Always use `from daytona import AsyncDaytona, DaytonaConfig` for the high-level SDK. If `pip install daytona-api-client-async` was explicitly chosen, be aware that you might be using a lower-level component than the primary SDK documented on daytona.io/docs. The recommended installation for the full SDK is `pip install daytona`.
affects: All versions
gotchaThe client requires an API key for authentication. If `DAYTONA_API_KEY` is not provided either via an environment variable or explicitly through `DaytonaConfig`, the SDK will raise a `DaytonaError`.
fix
Set the `DAYTONA_API_KEY` environment variable (e.g., `export DAYTONA_API_KEY="your_key_here"`) or pass it directly to `DaytonaConfig(api_key="your_key_here")` during client initialization.
affects: All versions
deprecatedThe `server_url` parameter within `DaytonaConfig` is deprecated and will be removed in a future version.
fix
Use the `api_url` parameter instead of `server_url` for configuring the Daytona API endpoint. Example: `DaytonaConfig(api_url="https://app.daytona.io/api")`.
affects: All versions
Upgrade
Version history
0.207.0latest on PyPI · released Aug 24, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
daytona-api-client-async — pip install daytona-api-client-async · libregistry