{"id":3952,"library":"daytona-toolbox-api-client","title":"Daytona Toolbox API Client","description":"The official Python client for interacting with the Daytona Toolbox API, enabling programmatic management of workspaces, projects, and sandboxes. As part of a rapidly evolving platform, this library sees frequent updates, typically on a daily or weekly cadence, and is currently in version 0.164.0.","status":"active","version":"0.164.0","language":"en","source_language":"en","source_url":"https://github.com/daytonaio/daytona/tree/main/sdk/python/daytona-toolbox-api-client","tags":["api client","daytona","developer tools","workspace management","cloud development environments"],"install":[{"cmd":"pip install daytona-toolbox-api-client","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for data validation and serialization of API models.","package":"pydantic"},{"reason":"HTTP client for making API requests.","package":"httpx"},{"reason":"Utility for parsing and handling dates in API responses.","package":"python-dateutil"}],"imports":[{"symbol":"DaytonaToolboxApiClient","correct":"from daytona_toolbox_api_client.client import DaytonaToolboxApiClient"}],"quickstart":{"code":"import os\nfrom daytona_toolbox_api_client.client import DaytonaToolboxApiClient\n\ndaytona_server_url = os.environ.get(\"DAYTONA_SERVER_URL\", \"\")\ndaytona_api_key = os.environ.get(\"DAYTONA_API_KEY\", \"\")\n\nif not daytona_server_url or not daytona_api_key:\n    print(\"Please set DAYTONA_SERVER_URL and DAYTONA_API_KEY environment variables, or log in via the Daytona CLI.\")\nelse:\n    try:\n        client = DaytonaToolboxApiClient(\n            server_url=daytona_server_url,\n            api_key=daytona_api_key,\n        )\n\n        # Example: List workspaces\n        workspaces = client.workspace.list_workspaces()\n        print(\"\\nYour workspaces:\")\n        if workspaces:\n            for workspace in workspaces:\n                print(f\"- {workspace.name} (ID: {workspace.id})\")\n        else:\n            print(\"No workspaces found.\")\n\n    except Exception as e:\n        print(f\"Error interacting with Daytona API: {e}\")","lang":"python","description":"This quickstart initializes the Daytona client using environment variables for authentication and then attempts to list the user's workspaces. Ensure DAYTONA_SERVER_URL and DAYTONA_API_KEY are set."},"warnings":[{"fix":"Always review release notes for new versions. Pin exact versions in production environments and test updates thoroughly.","message":"The library is pre-1.0 (0.x.x versioning), meaning API stability is not guaranteed between minor versions. Backward-incompatible changes can be introduced frequently without a major version bump.","severity":"breaking","affected_versions":"All versions < 1.0.0"},{"fix":"Review the updated error types and adjust `try-except` blocks accordingly. Refer to the official documentation for the new error structures.","message":"Error handling was standardized across SDKs in v0.163.0. If you have custom error handling logic, it may need to be updated.","severity":"breaking","affected_versions":"Prior to 0.163.0"},{"fix":"Ensure `DAYTONA_SERVER_URL` and `DAYTONA_API_KEY` are correctly set in your environment, or pass them explicitly to the `DaytonaToolboxApiClient` constructor.","message":"Authentication primarily relies on environment variables (`DAYTONA_SERVER_URL`, `DAYTONA_API_KEY`) or the CLI `daytona login`. Failure to configure these will result in client initialization errors or failed API calls.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the official Daytona API documentation or the client's source code to understand the available methods and their signatures for your installed version.","message":"The client is a thin wrapper around the OpenAPI specification. Direct access to API endpoints (e.g., `client.workspace.list_workspaces()`) relies on the OpenAPI structure and may change if the underlying API definitions are modified.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}