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.1.tar.gz (2.4 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.1.tar.gz.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_services-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fbadcd0d06f9281c485ab75d5ebd05ed56618d4afa7a67c47a5ef8005e58702e
MD5 dcd8141ddc3368d65051b66f28b329bc
BLAKE2b-256 caf4a018390d3d6924f64efbfc5c2060f0d50f90c005654076210d447deeb0a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_services-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78fae2286b7bf965cd36a00369303923de40b9d7c50cca8c779a6961e437cdea
MD5 678b888b31f97f8abf72ad16652ee8b6
BLAKE2b-256 ca76c14fd7ae5238c17ab378b681bb076be3050a084b5522f0e136ebff938674

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