semvec/pypi-packages huggingface dataset:
eldercrank-stripe-core 0.1.0b4
A no-nonsense Stripe integration by a grumpy dev.
License: MIT
Requires Python: >=3.13
Keywords: api-wrapper, fastapi, flask, payment-processing, stripe, webhooks

# eldercrank-stripe-core

A no-nonsense Stripe integration library that provides a clean, Pythonic interface to the Stripe API.

## Features

- **StripeHandler**: High-level interface for common Stripe operations including webhook handling
- **StripeManager**: Comprehensive CRUD operations for products, prices, customers, and subscriptions
- **Pydantic Models**: Type-safe models for Stripe events, products, and prices
- **Clean API**: Hides the complexity of working with raw Stripe JSON responses

## Installation

```bash
pip install eldercrank-stripe-core
```

## Quick Start

### Using StripeHandler

```python
from eldercrank.stripe.core import StripeHandler

handler = StripeHandler(
    api_key="sk_test_...",
    webhook_secret="whsec_..."
)

# Register a webhook handler
def handle_payment_success(event_data):
    print(f"Payment successful for customer: {event_data}")

handler.add_event_handler("payment_intent.succeeded", handle_payment_success)

# Process a webhook
event = handler.process_webhook(payload, signature)

# Create a subscription product
result = handler.create_subscription_product(
    name="Premium Plan",
    amount=1999,  # $19.99
    currency="usd",
    interval="month"
)
```

### Using StripeManager

```python
from eldercrank.stripe.core import StripeManager

manager = StripeManager(api_key="sk_test_...")

# Create a customer
customer = manager.create_customer(
    name="John Doe",
    email="john@example.com"
)

# Create a product
product = manager.create_product(
    name="Basic Plan",
    description="Basic subscription plan"
)

# Create a price
price = manager.create_price(
    product_id=product["id"],
    unit_amount=999,
    currency="usd",
    recurring={"interval": "month"}
)

# Create a subscription
subscription = manager.create_subscription(
    customer_id=customer["id"],
    price_id=price["id"]
)
```

## Framework Integrations

- **FastAPI**: See [eldercrank-stripe-fastapi](https://pypi.org/project/eldercrank-stripe-fastapi/)
- **Flask**: See [eldercrank-stripe-flask](https://pypi.org/project/eldercrank-stripe-flask/)

## License

MIT
MBTAclient 1.1.32
A Python client for interacting with the MBTA API
License: MIT
Requires Python: >=3.12

# MBTAclient

MBTAclient is an independent project and is not affiliated with or endorsed by the Massachusetts Bay Transportation Authority (MBTA).Transit data provided by the MBTA

**MBTAclient** is a Python client library for interacting with the Massachusetts Bay Transportation Authority (MBTA) API. This library provides access to MBTA data, including routes, predictions, schedules, and more.

## Contributing

Contributions are welcome! If you would like to contribute to this project, please fork the repository and submit a pull request.

## License

This project is licensed under the MIT License.