Skip to main content

Service layer for FastAPI with Email, Stripe, and Plan management

Project description

rodrigo0000-fastapi-core-services

Service layer for FastAPI with Email, Stripe, and Plan management.

Features

  • EmailService: Send emails using Resend API
  • StripeService: Stripe payment integration
  • PlanService: Subscription plan management

Installation

pip install rodrigo0000-fastapi-core-services

Usage

from rodrigo0000_fastapi_core_services import EmailService, StripeService, PlanService

# Email Service
email_service = EmailService()
await email_service.send_email(
    to="user@example.com",
    subject="Welcome",
    html="<h1>Welcome to our service</h1>"
)

# Stripe Service
stripe_service = StripeService()
payment_intent = stripe_service.create_payment_intent(amount=1000, currency="usd")

# Plan Service
plan_service = PlanService(db)
plans = plan_service.get_all_plans()

Components

  • EmailService: Email sending with Resend

    • Send transactional emails
    • Template support
    • Bulk email sending
  • StripeService: Payment processing

    • Payment intents
    • Subscriptions
    • Customer management
    • Webhook handling
  • PlanService: Subscription plans

    • Plan CRUD operations
    • User plan assignment
    • Plan history tracking

Requirements

  • Python >= 3.8
  • FastAPI >= 0.104.0
  • Stripe >= 7.0.0
  • Resend >= 0.8.0
  • SQLAlchemy >= 2.0.0

License

MIT License

Author

R Firm - Professional SaaS Development

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

rodrigo0000_fastapi_core_services-1.0.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file rodrigo0000_fastapi_core_services-1.0.2.tar.gz.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_services-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3e372c9c661e634bcac20280f54adcde1087b970efbd836fab65c9beb5fa879b
MD5 c551ec3d5ccde47016c403b3b4e4dcb8
BLAKE2b-256 90f1537a9d4ac6e6c14198f1d4440f3c01d488b01e227ffc1477943a208763a4

See more details on using hashes here.

File details

Details for the file rodrigo0000_fastapi_core_services-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_services-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e48e7991c2ae483dd121d7a0f9c7e4b3fc5ae1d1c1daf2ee0daded1629efe8f4
MD5 111e3c32c4b7bd55b5f1b0223219c35f
BLAKE2b-256 463b1b2ba4a2a8f6b1d8aefbec721496f947e344fd692550077967b56812b0cf

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