Home › Python / FastAPI › Python FastAPI AGENTS.md
Python FastAPI AGENTS.md
Universal AGENTS.md for Codex, Jules, Cursor and other agents working on a FastAPI + uv project.
AGENTS.mdPython / FastAPI
How to use
Save this as AGENTS.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.
AGENTS.mdDownload # AGENTS.md
## Setup
- `uv sync` installs everything. Run commands with `uv run`.
- Start: `uv run fastapi dev app/main.py`
## Checks (all must pass before you finish)
- `uv run ruff format . && uv run ruff check .`
- `uv run mypy app`
- `uv run pytest -q`
## Conventions
- Routers stay thin; logic goes in `app/services/`.
- Pydantic v2 schemas for all I/O. Use `model_config = ConfigDict(from_attributes=True)` for ORM mapping.
- New env vars must be added to `app/config.py` and `.env.example`.
## PRs
- Title: `<area>: <imperative summary>`. Include what changed, why, and how it was tested.
- Keep diffs focused; no drive-by reformatting of untouched files.