Featured
Python FastAPI CLAUDE.md Template
Complete CLAUDE.md for FastAPI backend projects
Category:templates
Type:template
Difficulty:intermediate
Language:Markdown
python
api
beginner
Description
Comprehensive CLAUDE.md template for Python FastAPI projects. Includes API structure, dependency injection patterns, database integration with SQLAlchemy, authentication setup, and testing guidelines.
Content
Resource Content
# FastAPI Project ## Overview Python backend API built with FastAPI framework. ## Tech Stack - Framework: FastAPI - Language: Python 3.11+ - Database: PostgreSQL + SQLAlchemy - Validation: Pydantic v2 - Testing: pytest ## Key Commands ```bash # Development uvicorn main:app --reload --port 8000 # Testing pytest -v pytest --cov=app tests/ # Linting ruff check . mypy . # Database alembic upgrade head alembic revision --autogenerate -m "description" ``` ## Project Structure ``` app/ ├── main.py # App entry point ├── api/ │ ├── routes/ # Route handlers │ └── dependencies/ # DI dependencies ├── core/ │ ├── config.py # Settings │ └── security.py # Auth utilities ├── models/ # SQLAlchemy models ├── schemas/ # Pydantic schemas ├── services/ # Business logic └── tests/ # Test files ``` ## Conventions - Use type hints everywhere - Dependency injection for services - Separate schemas for Create/Update/Response - Use async/await for I/O operations ## Important Notes - API docs at `/docs` (Swagger) and `/redoc` - Use `settings.py` for configuration - Alembic for database migrations
Rate This Resource
0
Help others discover great resources
Statistics
0
Stars
0
Copies
404
Days ago
524
Views
Related Resources
⚡
Node.js Express CLAUDE.md Template
Battle-tested CLAUDE.md for Express.js API projects
⚡
Django CLAUDE.md Template
CLAUDE.md for Django web applications
⚡
Next.js CLAUDE.md Template
Comprehensive CLAUDE.md for Next.js App Router projects
⚡
Go Project CLAUDE.md Template
CLAUDE.md for Go/Golang backend services