Python SDK reference
Auto-generated symbol reference for sonnylabs (PyPI) — every public class, method, options bag, exception subclass, and helper, rendered from the docstrings on the source.
This is the full symbol-by-symbol reference for the official Sonny Labs
Python SDK (sonnylabs).
Every page on this branch is generated at build time from the docstrings
on the source under sdks/python/sonnylabs/,
so it stays in lock-step with what pip install sonnylabs actually
ships.
If you are integrating the SDK for the first time, start with the Python quickstart — it walks through install, key minting, the first scan, error handling, idempotency, retries, self-hosted base URLs, and webhook verification with prose and copy-pasteable snippets. This reference is for looking up a specific symbol once you already know what you need.
Pages
SonnyLabsClient
The main API client — construction, methods for the /v1/* surface, and notes on the operations stubbed until codegen lands.
Constructor options
Constructor arguments — api_key, base_url, api_version, timeout_s, max_retries, and the httpx transport injection point.
Exception classes
The typed exception hierarchy that maps RFC 9457 problem+json envelopes onto subclasses by code namespace.
Problem envelope
The shape of an RFC 9457 application/problem+json body the SDK consumes, and how it threads onto every SonnyLabsError.
verify_webhook
Constant-time HMAC verification helper for inbound webhook deliveries, plus the tolerance and clock-injection knobs.
verifyWebhook
Constant-time HMAC-SHA256 verification for inbound Sonny Labs webhook deliveries, plus VerifyWebhookOptions for replay-window tolerance and clock injection.
SonnyLabsClient
The main sonnylabs client class — constructor, scan methods, identity and API-key endpoints, and the underlying httpx transport hook.