python-best-practices
Installation
SKILL.md
Python & FastAPI Best Practices
Architectural patterns and performance guide for FastAPI, Pydantic v2, and SQLAlchemy 2.0 applications. Contains 38 rules across 8 categories, prioritized by impact. Focuses on patterns that linters cannot catch — async correctness, dependency injection, session management, schema design.
When to Apply
Reference these guidelines when:
- Writing new FastAPI endpoints or routers
- Designing Pydantic request/response models
- Implementing SQLAlchemy database queries or sessions
- Reviewing async Python code for correctness
- Refactoring existing FastAPI applications
- Setting up project structure for a new Python API