pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
AGENTS.md
Generated from governance.md by crag. Regenerate:
crag compile --target agents-md
Project: fastapi
Quality Gates
All changes must pass these checks before commit:
Lint
uv run mypy .
Test
uv run pytest
Build
python -m build
Ci (inferred from workflow)
python -m build --sdistuv run --no-sync bash scripts/test-cov.shuv run --no-sync pytest tests/benchmarks --codspeeduv run coverage combine coverageuv run coverage html --title "Coverage for ${{ github.sha }}"uv run coverage report --fail-under=100
Coding Standards
- Stack: python
- Follow project commit conventions
Architecture
- Type: monolith
Key Directories
.github/— CI/CDdocs/— documentationscripts/— toolingtests/— tests
Testing
- Framework: pytest
- Layout: flat
- Naming: test_*.py
Anti-Patterns
Do not:
- Do not catch bare
Exception— catch specific exceptions - Do not use mutable default arguments (e.g.,
def f(x=[])) - Do not use
import *— use explicit imports
Security
- No hardcoded secrets — grep for sk_live, AKIA, password= before commit
Workflow
- Read
governance.mdat the start of every session — it is the single source of truth. - Run all mandatory quality gates before committing.
- If a gate fails, fix the issue and re-run only the failed gate.
- Use the project commit conventions for all changes.