Skip to content

NAYANKUMAR21/Python-Backend-Production

Repository files navigation

Tech Stack:

  1. Backend Framework:

    • FastAPI (v0.118.0) - Modern, fast web framework for building APIs with Python 3.7+
    • Uvicorn - ASGI server for running FastAPI applications
    • Starlette - Lightweight ASGI framework/toolkit (dependency of FastAPI)
  2. Database:

    • SQLAlchemy (v2.0.43) - SQL toolkit and ORM
    • PostgreSQL (psycopg2-binary v2.9.10)
    • Redis (v6.4.0) - For caching and/or pub/sub
    • Alembic (v1.16.5) - Database migration tool
  3. Authentication & Security:

    • Python-Jose (v3.5.0) - JWT implementation
    • Passlib (v1.7.4) - Password hashing
    • Bcrypt (v5.0.0) - Password hashing
    • Cryptography (v46.0.1) - Additional cryptographic functionality
  4. API Documentation:

    • Built-in OpenAPI/Swagger UI (via FastAPI)
    • ReDoc documentation
  5. Development & Testing:

    • Pytest (v8.4.2) - Testing framework
    • Pytest-asyncio (v1.2.0) - Async test support
    • HTTPX (v0.28.1) - HTTP client for testing
  6. Configuration & Environment:

    • Pydantic (v2.11.9) - Data validation and settings management
    • Python-dotenv (v1.1.1) - Environment variable management

Production-Ready Components:

  1. API Structure:

    • Versioned API endpoints (v1)
    • Well-organized project structure with separate modules for:
      • API routes
      • Database models
      • Schemas (Pydantic models)
      • Core utilities
      • Middleware
      • Configuration
  2. Security Features:

    • CORS middleware with configurable allowed origins
    • Trusted Host middleware
    • JWT-based authentication
    • Secure password hashing with bcrypt
    • Environment-based configuration
  3. Infrastructure:

    • Containerization-ready (Docker)
    • Environment-specific configuration
    • Database migrations with Alembic
  4. Monitoring & Logging:

    • Custom logging middleware
    • Structured logging setup
    • Error handling middleware
  5. Performance:

    • Async/await support
    • Uvicorn with uvloop for better performance
    • Redis for caching
  6. API Documentation:

    • Auto-generated OpenAPI documentation
    • Interactive API documentation (Swagger UI)
    • Alternative documentation (ReDoc)

About

1.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published