Configuration
Configure the SDK globally or per-instance.Getting Started
Quick setup guide.
Error Handling
Retry policies and error types.
Zaby client
TheZaby constructor accepts:
API key for
x-zaby-api-key header. Can be a static string, sync callable, or async callable.JWT for
Authorization: Bearer header. Optional for most provisioning endpoints.Custom transport. Use
MockTransport for testing.Per-instance configuration overrides.
Global configuration
Set defaults shared across all client instances:- Python
- TypeScript
- Python
- TypeScript
Instance config merges over globals — only specify the fields you want to override.
Config fields
api_origin — Base URL
api_origin — Base URL
Base URL for all API requests. Override for local development or custom deployments.
- Python
- TypeScript
timeout_ms — Request timeout
timeout_ms — Request timeout
Maximum time to wait for a response, in milliseconds.
- Python
- TypeScript
retries — Retry configuration
retries — Retry configuration
Configure which requests are retried and how.
- Python
- TypeScript
user_agent — Custom User-Agent
user_agent — Custom User-Agent
- Python
- TypeScript
environment — Environment preset
environment — Environment preset
Sets a preset origin.
“local” → http://localhost:9080Retry policy
Maximum retry attempts
HTTP methods eligible for retry
Status codes that trigger a retry
Delay function:
lambda attempt: min(100 * 2**attempt, 1000)Authentication providers
Credentials can be static strings, lazy callables, or async callables:- Python
- TypeScript
Environment variables
Explicit
api_origin always takes precedence over environment presets.Resolve configuration
The SDK resolves effective config by merging overrides → global config → env vars → defaults. The resolve function is useful when you want to inspect the final config without creating a client:- Python
- TypeScript
ZabyRuntime options
JWT runtime token for
Authorization: BearerCustom transport for testing.
Runtime-specific config overrides.
- Python
- TypeScript
Request options
Per-request options for fine-grained control:Custom request ID for idempotency and tracing
Cancellation signal to abort in-flight requests
- Python
- TypeScript
List response
Paginated list operations return aListResponse wrapper:
Result items
Current page number
Items per page
Total item count

