Python SDK
Install the versioned Python client. Python 3.10+ is required;
there are no runtime dependencies. Load DEFDEX_API_KEY privately.
Methods
Results are dictionaries with the HTTP response shape. List/detail data reads include
build_id; correction responses use their own receipt/page shapes. Filters are encoded
as JSON and IDs as path segments automatically.
Preserve money
Do not convert decimal strings to float. Preserve nulls and negative obligations.
Ceilings are not spending.
Configuration and failures
DefDexClient(api_key=None, base_url="https://app.defdex.io/api/v1", timeout=30)
uses a 30-second timeout by default. DefDexError exposes status, request_id
and retry_after; transport failures use status 0. Requests identify as
DefDexPythonSDK/0.1.1.
The client does not automatically retry or follow redirects. Use bounded retries and preserve correction idempotency keys across uncertain results. Use HTTPS for remote base-URL overrides; loopback HTTP is supported for local testing.
