Installation
Client Configuration
Tool Execution
execute_tool
Execute an MCP tool by its alias name.
Returns: Tool execution result (type varies by tool).
Raises:
DatagenAuthError, DatagenToolError, DatagenHttpError
Custom Tool Deployment
deploy_custom_tool
Deploy a Python workflow as an API endpoint.
Returns:
Dict with deployment_uuid and deployment details.
Raises: DatagenDeploymentError
update_custom_tool
Update an existing custom tool. Only provided fields are updated.
Returns:
Dict with updated deployment details.
Raises: DatagenDeploymentError
get_custom_tool
Get details of a custom tool.
list_custom_tools
List all custom tools.
Custom Tool Execution
run_custom_tool
Run a custom tool synchronously (blocks until complete).
Returns:
Dict with run_uuid, status, and output_vars.
Raises: DatagenDeploymentError
run_custom_tool_async
Run a custom tool asynchronously (returns immediately).
run_custom_tool.
Returns: Dict with run_uuid and status: "pending".
Raises: DatagenDeploymentError
check_run_status
Check the status of a custom tool run.
Dict with run_uuid and status ("pending", "running", "completed", or "failed").
get_run
Get full details of a custom tool run including output.
Dict with complete run details including output_vars.
wait_for_run
Poll until an async run completes or fails.
Returns: Final run result with
output_vars.
Raises: DatagenDeploymentError on failure or timeout.
Secret Management
list_secrets
List all secrets (values are never returned).
name, masked_value, provider, etc.).
set_secret
Create or update a secret.
Raises:
DatagenSecretError if secret exists and force=False.
Error Types
All exceptions inherit fromDatagenError.