ClientOptions when you construct the generated client. The runtime validates and snapshots the options before it accepts sends.
Credential and endpoint precedence
Credential precedence, highest first:api_key_provider resolved for each operation, a fixed api_key, REPOST_SEND_API_KEY, then REPOST_TOKEN. api_key and api_key_provider cannot both be set. With no credential, the send fails with RepostConfigurationError and ErrorCode.CONFIGURATION before touching the network.
Endpoint precedence is an explicit api_url, REPOST_API_URL, then https://api.repost.sh. Plain http:// is accepted only for loopback hosts. Environment values and every mutable option are copied at construction. Later environment or list mutations do not change that client.
Defaults
All duration options are integer milliseconds. Floats anddatetime.timedelta values are rejected.
The generator, clock, entropy, and scheduler options are deterministic seams intended mainly for tests.
The SDK sends the
User-Agent token repost-client-python/<version>. When user_agent_suffix is set, one space and the validated suffix are appended.
Proxy, DNS, TLS, and mTLS
ProxyOptions supports only explicit http://host:port CONNECT proxies. When configured, the credential provider is called before CONNECT and its Basic credentials are sent on that first request. The client ignores ambient proxy variables and does not follow redirects.
TLSOptions uses TLS 1.2 or 1.3 and verifies certificates and hostnames. Custom CA certificates replace the default trust roots. ClientCertificate supports an optional passphrase. There is no certificate-verification bypass. A custom dns_resolver returns ResolvedAddress values when application-controlled DNS is required. It must return promptly; CPython cannot forcibly interrupt a synchronous callback that blocks forever.
Continue
Reliability
See how deadlines, retries, cancellation, and capacity settle.
Observability
Attach diagnostics, observers, metrics, and traces.
Frameworks
Own one client for the application lifecycle.