Python SDK
The official Python SDK for Danube AI provides a clean, Pythonic interface for accessing services, tools, skills, and user identity through the Danube platform.Installation
Quick Start
Authentication
The SDK uses your Danube API key for authentication. You can provide it in two ways:Async Support
For better performance in async applications, useAsyncDanubeClient:
API Reference
Services
Tools
Skills
Identity
Workflows
Sites
Error Handling
The SDK provides specific exception types for different error conditions:Configuration Options
| Parameter | Environment Variable | Default | Description |
|---|---|---|---|
api_key | DANUBE_API_KEY | (required) | Your Danube API key |
base_url | DANUBE_API_URL | https://api.danubeai.com | API base URL |
timeout | DANUBE_TIMEOUT | 30 | Request timeout (seconds) |
max_retries | DANUBE_MAX_RETRIES | 3 | Max retry attempts |
Models
Service
| Field | Type | Description |
|---|---|---|
id | str | Service UUID |
name | str | Service name |
description | str | Service description |
service_type | str | ”mcp_server”, “api”, or “internal” |
tool_count | int | Number of available tools |
is_connected | bool | Whether MCP service is connected |
Tool
| Field | Type | Description |
|---|---|---|
id | str | Tool UUID |
name | str | Tool name |
description | str | Tool description |
service_id | str | Parent service ID |
parameters | dict | Parameter definitions |
ToolResult
| Field | Type | Description |
|---|---|---|
success | bool | Whether execution succeeded |
result | Any | Execution result |
error | str | Error message (if failed) |
content | str | Result as text (property) |
duration_ms | float | Execution time |
Workflow
| Field | Type | Description |
|---|---|---|
id | str | Workflow UUID |
name | str | Workflow name |
description | str | Workflow description |
step_count | int | Number of steps |
visibility | str | ”public” or “private” |
tags | list[str] | Workflow tags |
total_executions | int | Total execution count |
WorkflowExecution
| Field | Type | Description |
|---|---|---|
id | str | Execution UUID |
workflow_id | str | Parent workflow ID |
status | str | ”pending”, “running”, “success”, or “failed” |
inputs | dict | Input values provided |
step_results | list | Per-step results |
error | str | Error message (if failed) |
execution_time_ms | int | Total execution time |
AgentSite
| Field | Type | Description |
|---|---|---|
id | str | Site UUID |
domain | str | Site domain |
url | str | Full URL |
status | str | ”pending”, “crawling”, “analyzed”, or “live” |
components | SiteComponents | Structured site data (contact, pricing, docs, etc.) |
category | str | Site category |
tags | list[str] | Site tags |
