This release is a pre-release and may not be stable for production use.
eldercrank-stripe-fastapi
FastAPI integration for the eldercrank-stripe library, providing easy webhook handling for Stripe events in FastAPI applications.
Features
- Simple Router Creation: One function call to create a webhook router
- Automatic Signature Verification: Handled by the underlying StripeHandler
- Customizable Path: Configure your webhook endpoint path
- Proper Error Handling: Returns appropriate HTTP status codes for Stripe
Installation
pip install eldercrank-stripe-fastapi
Quick Start
from fastapi import FastAPI
from eldercrank.stripe.core import StripeHandler
from eldercrank.stripe.fastapi import create_stripe_router
# Create your Stripe handler
handler = StripeHandler(
api_key="sk_test_...",
webhook_secret="whsec_..."
)
# Create your FastAPI app
app = FastAPI()
# Include the Stripe webhook router
app.include_router(create_stripe_router(handler))
# Register event handlers
def handle_payment_success(event_data):
print(f"Payment successful!")
handler.add_event_handler("payment_intent.succeeded", handle_payment_success)
Custom Webhook Path
# Use a custom webhook path
app.include_router(
create_stripe_router(handler, webhook_path="/stripe/webhook")
)
License
MIT
Metadata
Release files for eldercrank-stripe-fastapi 0.1.0b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| eldercrank_stripe_fastapi-0.1.0b2.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eldercrank_stripe_fastapi-0.1.0b2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / eldercrank_stripe_fastapi-0.1.0b2.tar.gz
| Download URL | eldercrank_stripe_fastapi-0.1.0b2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
049471c6406168efd34fd8fb0fe6704d9b26cef58158472facc19a87d131b324
|
|
BLAKE2b-256 checksum How to use checksums |
8789ee4493eb302308e5e152bf9ccd0e53ba654e7396ea48f9a023e6171ba961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Release files / eldercrank_stripe_fastapi-0.1.0b2-py3-none-any.whl
| Download URL | eldercrank_stripe_fastapi-0.1.0b2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
328e3b8f4b1f5768e2a15dd1ba8fc65de89cc65e4de8ccfa57ddf71607283910
|
|
BLAKE2b-256 checksum How to use checksums |
f89f8cbe48c647756fdbee348356e406283cdb0675fff3fe309b2b0becc8f2a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Security for eldercrank-stripe-fastapi 0.1.0b2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.