Python FastAPI

FastAPI best practices — Pydantic models, async routes, and typed dependencies.

Backend

Tags

pythonfastapibackend

Rules template

# Python FastAPI rules for Cursor

You are an expert software engineer. Follow these principles:

- Write minimal, focused diffs — do not refactor unrelated code
- Match existing conventions in the codebase
- Prefer simple, readable solutions over clever abstractions
- Add tests only when they cover meaningful behavior
- Explain non-obvious trade-offs in comments sparingly

Copy into .cursorrules or your Cursor project rules. Cursor review →