python-best-practices
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
Target Versions
- Python 3.11+
- FastAPI 0.104+
- Pydantic 2.x
More from brite-nites/britenites-claude-plugins
verification-before-completion
Ensures tasks are genuinely resolved before marking them done. Activates at task checkpoints during plan execution — validates that fixes actually work, tests genuinely pass, and acceptance criteria are met. Prevents premature completion declarations.
16writing-plans
Breaks work into bite-sized tasks before coding. Activates when a multi-step task needs planning — creates tasks small enough for a junior developer to follow (2-5 minutes each), with exact file paths, complete implementation details, and verification steps. References Linear issue context and project-specific test commands from CLAUDE.md.
14systematic-debugging
Four-phase root cause analysis for bug investigation. Activates when debugging unexpected behavior, failing tests, or production issues — follows reproduce, isolate, analyze, fix with defense-in-depth. Uses condition-based waiting instead of arbitrary delays. Available anytime, not tied to the inner loop sequence.
14refine-plan
Refines a v1 project plan into agent-ready tasks with clear context, implementation steps, and validation criteria. Use after /plan-project has produced a v1 plan.
13setup-claude-md
Generates a best-practices CLAUDE.md file for the project. Analyzes the codebase and applies Claude Code best practices for optimal agent performance. Use at project setup or after /create-issues.
13executing-plans
Executes a structured plan using subagent-per-task with TDD enforcement. Activates when given an approved plan to implement — launches fresh subagents for each task, enforces red-green-refactor, runs two-stage review per task, and checkpoints between tasks. Parallelizes independent tasks.
13