semvec/pypi-packages huggingface dataset:
eldercrank-stripe-flask 0.1.0b2
Flask integration for the eldercrank-stripe library, providing easy webhook handling for Stripe events in Flask applications.
License: MIT
Requires Python: >=3.13
Keywords: api-integration, flask, payment-processing, stripe, webhook

# eldercrank-stripe-flask

Flask integration for the eldercrank-stripe library, providing easy webhook handling for Stripe events in Flask applications.

## Features

- **Simple Blueprint Creation**: One function call to create a webhook blueprint
- **Automatic Signature Verification**: Handled by the underlying StripeHandler
- **Customizable URL Prefix**: Configure your webhook endpoint prefix
- **Proper Error Handling**: Returns appropriate HTTP status codes for Stripe

## Installation

```bash
pip install eldercrank-stripe-flask
```

## Quick Start

```python
from flask import Flask
from eldercrank.stripe.core import StripeHandler
from eldercrank.stripe.flask import create_stripe_blueprint

# Create your Flask app
app = Flask(__name__)

# Create your Stripe handler
handler = StripeHandler(
    api_key="sk_test_...",
    webhook_secret="whsec_..."
)

# Register the Stripe webhook blueprint
app.register_blueprint(create_stripe_blueprint(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 URL Prefix

```python
# Use a custom URL prefix
app.register_blueprint(
    create_stripe_blueprint(handler, url_prefix="/payments/stripe")
)
```

This will register the webhook endpoint at `/payments/stripe/webhook`.

## License

MIT
eldercrank-stripe-fastapi 0.1.0b2
FastAPI integration for the eldercrank-stripe library, providing easy webhook handling for Stripe events in FastAPI applications.
License: MIT
Requires Python: >=3.13
Keywords: api-integration, fastapi, payment-processing, stripe, webhook

# 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

```bash
pip install eldercrank-stripe-fastapi
```

## Quick Start

```python
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

```python
# Use a custom webhook path
app.include_router(
    create_stripe_router(handler, webhook_path="/stripe/webhook")
)
```

## License

MIT