Skip to main content

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:
Get your API key from the Danube Dashboard.

Async Support

For better performance in async applications, use AsyncDanubeClient:

API Reference

Services

Tools

Skills

Identity

Workflows

Sites

Error Handling

The SDK provides specific exception types for different error conditions:

Configuration Options

ParameterEnvironment VariableDefaultDescription
api_keyDANUBE_API_KEY(required)Your Danube API key
base_urlDANUBE_API_URLhttps://api.danubeai.comAPI base URL
timeoutDANUBE_TIMEOUT30Request timeout (seconds)
max_retriesDANUBE_MAX_RETRIES3Max retry attempts

Models

Service

FieldTypeDescription
idstrService UUID
namestrService name
descriptionstrService description
service_typestr”mcp_server”, “api”, or “internal”
tool_countintNumber of available tools
is_connectedboolWhether MCP service is connected

Tool

FieldTypeDescription
idstrTool UUID
namestrTool name
descriptionstrTool description
service_idstrParent service ID
parametersdictParameter definitions

ToolResult

FieldTypeDescription
successboolWhether execution succeeded
resultAnyExecution result
errorstrError message (if failed)
contentstrResult as text (property)
duration_msfloatExecution time

Workflow

FieldTypeDescription
idstrWorkflow UUID
namestrWorkflow name
descriptionstrWorkflow description
step_countintNumber of steps
visibilitystr”public” or “private”
tagslist[str]Workflow tags
total_executionsintTotal execution count

WorkflowExecution

FieldTypeDescription
idstrExecution UUID
workflow_idstrParent workflow ID
statusstr”pending”, “running”, “success”, or “failed”
inputsdictInput values provided
step_resultslistPer-step results
errorstrError message (if failed)
execution_time_msintTotal execution time

AgentSite

FieldTypeDescription
idstrSite UUID
domainstrSite domain
urlstrFull URL
statusstr”pending”, “crawling”, “analyzed”, or “live”
componentsSiteComponentsStructured site data (contact, pricing, docs, etc.)
categorystrSite category
tagslist[str]Site tags

Source Code

The SDK is open source and available on GitHub: