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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_models-1.0.1.tar.gz
Algorithm Hash digest
SHA256 61a0f2d2cae35f2d4a2a65c8b06d00f877983def75b4297572da544bb6d50f98
MD5 766039fc76a2b58ea85313ede8908d56
BLAKE2b-256 b45b46bdbc6b6938a26bd3a18e11596cf3bf09314124a3dbf0977783488c1a5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_models-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 762bd70951152cc8f6742c9c893dc24e12e476acf3d2e4cd43f25cd382513d26
MD5 23e0abc6363dd51676e6cb24c836669b
BLAKE2b-256 c13c32384d98fbbd25bd6dcb58d203054654da3badd05bb1fcfec93a39b07c75

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