python.md

Python Technology Stack

IMPORTANT NOTE: This document is not final; it is under review.

This document outlines the specific standards and conventions for developing backend services with Python.

Core Stack

Testing

Naming Conventions

Dependency Management

Directory Structure

A standard structure for FastAPI projects is as follows:

project_name/ ├── alembic/ # Database migrations ├── tests/ # All tests ├── project_name/ │ ├── api/ # API endpoints and routers │ │ └── v1/ │ │ └── endpoints/ │ │ └── users.py │ ├── core/ # Configuration, startup events │ ├── db/ # Database session, models │ ├── schemas/ # Pydantic schemas │ ├── services/ # Business logic │ └── main.py # FastAPI app instantiation ├── .env ├── poetry.lock └── pyproject.toml