Skip to main content
The Darwin Python SDK is generated from the reviewed public OpenAPI contract. This page defines the client surface and runtime behavior; use the API reference for endpoint schemas.

Clients

Darwin is synchronous. AsyncDarwin exposes the same resource methods as coroutines. Create clients once and reuse them so their underlying HTTP sessions can reuse connections.

Configuration

Both clients accept:
  • token — a bearer token string or token provider
  • environment or base_url — production by default, or an explicit API origin
  • timeout — request timeout in seconds; the generated default is 60 seconds
  • max_retries — retry ceiling; the generated default is 2
  • headers — additional headers sent with every request
  • logging — SDK logging configuration or a custom logger
AsyncDarwin also accepts async_token and a custom httpx.AsyncClient.

Resource clients

The public product name is Connect; applications remains the generated client property for compatibility with the current API contract.

Naming and return types

Python methods use snake_case and return generated typed models.
Method arguments are keyword arguments except identifiers that the generated signature marks as positional. Model fields use Python naming while request serialization follows the API schema.

Async usage

Use one async client per application lifecycle. If you provide a custom async HTTP client, its connection limits, proxies, and TLS configuration apply to every resource.

Failures and retries

The SDK raises generated errors for non-success responses and transport failures. Retries are limited to eligible transient failures; validation or authorization errors are returned immediately. Set a request-specific timeout or retry count only when an operation needs behavior different from the client default.
Retries can repeat a request. Use stable idempotency behavior for create or action methods and do not retry authorization or validation failures blindly.
See Errors for the public error model and Python and TS Cheat Sheets for common method mappings.