Skip to main content

SQLAlchemy models for FastAPI applications

Project description

rodrigo0000-fastapi-core-models

SQLAlchemy models for FastAPI applications.

Features

  • Pre-built SQLAlchemy models for common entities
  • Pydantic schemas for request/response validation
  • User models with authentication fields
  • Plan and subscription models
  • Timestamped base models

Installation

pip install rodrigo0000-fastapi-core-models

Usage

from rodrigo0000_fastapi_core_models import User, Plan, UserCreate, UserResponse

# Use in your FastAPI application
from sqlalchemy.orm import Session

def create_user(db: Session, user: UserCreate):
    db_user = User(**user.dict())
    db.add(db_user)
    db.commit()
    return db_user

Components

  • User Models: User entity and schemas
  • Plan Models: Subscription plan models
  • Base Models: Timestamped base classes
  • Pydantic Schemas: Request/response validation models

Requirements

  • Python >= 3.8
  • SQLAlchemy >= 2.0.0
  • Pydantic >= 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_models-1.0.2.tar.gz (3.1 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_models-1.0.2.tar.gz.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_models-1.0.2.tar.gz
Algorithm Hash digest
SHA256 03ab9569c803c0de74c1d1d9b9b087b9bdbd1b39cf40f8c9878bdd1e5534942e
MD5 ac0054040faf02d0d6905e3fccd44480
BLAKE2b-256 2c6b19d66dd072f4904bd5c3357a3bc19d0d8587f821a7ef771764b6dfbf9936

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_models-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3d309b09f0a730b49bb25ded93c067375ae487116b2e5cbbabe352cd738831d9
MD5 2ee1f05bccd9be89d07c2f832777359f
BLAKE2b-256 17641eb282a63aaf213aab064bb713280af646ee4e36dce1e3f8e19ccbf69958

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