Python

Thinwrap publishes three Python packages on PyPI. The claims below hold for Python only — they're the developer-honest version of the umbrella "zero deps, BYO HTTP" pitch, narrowed to what's true on the standard library's urllib.

Python constraints

Runtime dependencies
Zero runtime dependencies
BYO HTTP client
Transport protocol: any object with send(HttpRequest) -> HttpResponse, passed as transport=
Provenance
PEP 740 attestations (PyPI Trusted Publishing)
Minimum runtime
Python 3.10+
  • Truly zero dependencies — the standard library urllib.request is the only HTTP surface, and AWS SigV4 (SES, SNS, Bedrock) / JWT signing (FCM RS256, APNs ES256) are implemented in pure Python on hashlib and hmac, with no cryptography package.
  • Synchronous by design. For async or pooled HTTP, inject an httpx or requests based Transport; the library never imports either.
  • The default transport never follows redirects — a 3xx surfaces as an error rather than silently re-sending auth headers to another host.

Python packages

Baseline-coverage discipline

The unified facade surface includes only features that ≥90% of providers natively support. Sub-baseline fields stay accessible via thePassthrough escape hatch (body deep-merged into the request body; consumer values win). Cross-language parity with the TypeScript, PHP, and Go packages is tracked as a design goal — not a hard release gate — so a connector can land in one language ahead of the others.

Every operation failure raises a ConnectorError carrying a typed ProviderCode; misusing the API (a config for the wrong channel, a value outside a closed vocabulary) raises the nativeTypeError or ValueError instead. Because the wrapper holds no state, retry strategy, token caching, and connection pooling live with the consumer — pass any object withsend(HttpRequest) -> HttpResponse astransport=. The wrapper performs no automatic retry; the raw Retry-After header and its parsed seconds ride inConnectorError.cause. There is noretry_after_seconds attribute — by design.