Factory.ai

Open-Source Wikis

/

FastAPI

/

How to contribute

fastapi/fastapi

How to contribute

The official process is the contributing guide on the docs site. CONTRIBUTING.md in the repo root is a one-line pointer to that page. This wiki section captures the parts a developer cares about while working in the codebase.

Pickup workflow

  1. Fork on GitHub, branch off master.
  2. Run uv sync --all-extras --group dev (or PDM equivalent) to install everything tests need.
  3. Make changes. Touch fastapi/, the corresponding tests, and any tutorial example under docs_src/ if the change is observable in user examples.
  4. Run bash scripts/lint.sh and bash scripts/test.sh locally.
  5. Open the PR. CI runs the same lint + tests, plus build-redistribute, docs build, and the smokeshow coverage uploader.

Definition of done

  • Tests cover the change. The pyproject coverage source includes fastapi, tests, and docs_src β€” touching docs_src/ typically requires a matching test under tests/test_tutorial/.
  • bash scripts/lint.sh passes (mypy + ty + ruff).
  • For changes to public API, a release-notes entry is not added by hand β€” github-actions[bot] regenerates πŸ“ Update release notes commits via .github/workflows/latest-changes.yml.
  • For changes to translated content, the notify-translations.yml workflow opens issues in language-specific tracking threads.

What to read before changing each area

If you're touching… Read first
fastapi/applications.py Application core
fastapi/routing.py Routing
fastapi/dependencies/ Dependency injection
fastapi/openapi/ OpenAPI generation
fastapi/security/ Security
fastapi/_compat/ Pydantic compatibility
tests/ Testing
docs_src/ Tooling β€” the docs build and translation pipeline

Sub-pages

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

How to contribute – FastAPI wiki | Factory