Skip to main content

Provider-agnostic async subscription management library for SaaS applications

Project description

SubscriptionKore

Provider-agnostic async subscription management library for SaaS applications

Documentation Status

Features

  • Multi-provider support: Stripe, Paddle, Chargebee, Lemon Squeezy
  • Async-first: Built with asyncio for high performance
  • Type-safe: Full type hints and Pydantic models
  • Database agnostic: Works with SQLAlchemy, Redis, and more
  • Event-driven: Domain events for extensibility
  • FastAPI integration: Ready-to-use FastAPI routers

Installation

pip install subscriptionkore

For optional dependencies:

pip install subscriptionkore[all]  # All providers and integrations

Quick Start

from subscriptionkore import SubscriptionKore, SubscriptionKoreConfig

# Configure
config = SubscriptionKoreConfig(
    default_provider="stripe",
    stripe_api_key="sk_test_...",
)

# Initialize
async with SubscriptionKore(config) as sk:
    # Create customer
    customer = await sk.create_customer(
        email="user@example.com",
        name="John Doe"
    )

    # Create subscription
    subscription = await sk.create_subscription(
        customer_id=customer.id,
        price_id="price_123"
    )

    print(f"Created subscription: {subscription.id}")

Documentation

Full documentation is available at Read the Docs.

Examples

See the examples/ directory for complete applications:

  • fastapi_app.py: FastAPI integration example
  • multi_provider_app.py: Multi-provider setup

Contributing

Contributions are welcome! Please see the contributing guide.

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subscriptionkore-0.1.0.tar.gz (8.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subscriptionkore-0.1.0-py3-none-any.whl (88.8 kB view details)

Uploaded Python 3

File details

Details for the file subscriptionkore-0.1.0.tar.gz.

File metadata

  • Download URL: subscriptionkore-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.2

File hashes

Hashes for subscriptionkore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b77d49e98564bee399db99b73ae32cefdc1684ca1bbc2af2f90044e1958fa6d1
MD5 780d89d2288e5fc2110e5714b4405f39
BLAKE2b-256 ff15ced17281f5b1b6079e431861a093c9e046c79e6e5b75914e334be40b1a38

See more details on using hashes here.

File details

Details for the file subscriptionkore-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for subscriptionkore-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2acbd0a75d2138a6442e1b596a640ac381f22b40580d4c1868a46c74e454b725
MD5 9cf276f0dcea79a0b5539c519dd992db
BLAKE2b-256 e1a9f13bb86c6fdf9307123740d2e13acdac0841f3cd44b4c28aa8c84334938a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page