// the find
stripe/stripe-python
Python library for the Stripe API.
The official Stripe Python SDK. If you're accepting payments in Python, this is what you use — there's no real alternative. Actively maintained by Stripe, covers the full API surface including v2 endpoints and preview features.
Full type annotations since v7.1 using TypedDict/Unpack, which means your editor actually catches mistakes at the call site. Async support is first-class with _async method variants and httpx/aiohttp backends, not bolted on. Automatic retry with idempotency keys built in — you set max_network_retries and it handles 409s and transient failures safely. The StripeClient architecture (introduced in v8) is cleanly scoped versus the old global-state pattern, making it testable and multi-account-friendly.
Type annotations are explicitly not covered by semver — a minor version bump can introduce type errors in your codebase with no warning, which is unusual and will surprise teams that pin loosely. The async HTTP client defaults to httpx but the sync client uses requests, so you end up with two HTTP libraries in your dependency tree unless you explicitly configure one. The legacy global client pattern (stripe.api_key = ...) is still supported and not yet formally deprecated, so you'll find it all over Stack Overflow and tutorials, and new developers will cargo-cult it. stripe-mock for testing requires a running Go binary, which adds friction to CI setup that pure Python test suites don't have.