Files that are both large and changed often are where bugs tend to cluster and where refactoring pays off first. Each file in the current tree is placed by its size and by the number of commits that changed it; its hotspot score is changes × √lines. Files without counted lines, such as binary files, are left out.
Each dot is a file; a bigger dot is a higher score. The dashed lines mark the median file size and the median number of changes, so the large files that change often are in the top right. Both axes are logarithmic. Showing the 2,000 highest-scoring of 2,805 files.
The files ranked by hotspot score: the larger a file is and the more often it changes, the higher it ranks. Authors is how many people have changed the file, bots aside, as on the Code Ownership page: a hotspot only one person has changed is also a bus-factor risk.
| File | Lines | Changes | Authors | Score | |
|---|---|---|---|---|---|
| docs/en/docs/release-notes.md | 7,519 | 3,699 | 13 | 320,748.3 | |
| fastapi/routing.py | 6,529 | 188 | 52 | 15,190.8 | |
| uv.lock | 4,963 | 120 | 5 | 8,453.8 | |
| fastapi/applications.py | 4,838 | 109 | 42 | 7,581.6 | |
| fastapi/dependencies/utils.py | 1,053 | 157 | 50 | 5,094.6 | |
| pyproject.toml | 418 | 241 | 49 | 4,927.3 | |
| README.md | 533 | 191 | 30 | 4,409.6 | |
| docs/en/mkdocs.yml | 333 | 143 | 42 | 2,609.5 | |
| fastapi/openapi/utils.py | 679 | 89 | 33 | 2,319.1 | |
| .github/workflows/test.yml | 332 | 107 | 13 | 1,949.6 |
| File | Lines | Changes | Authors | Score | |
|---|---|---|---|---|---|
| docs/en/docs/release-notes.md | 7,519 | 3,699 | 13 | 320,748.3 | |
| fastapi/routing.py | 6,529 | 188 | 52 | 15,190.8 | |
| uv.lock | 4,963 | 120 | 5 | 8,453.8 | |
| fastapi/applications.py | 4,838 | 109 | 42 | 7,581.6 | |
| fastapi/dependencies/utils.py | 1,053 | 157 | 50 | 5,094.6 | |
| pyproject.toml | 418 | 241 | 49 | 4,927.3 | |
| README.md | 533 | 191 | 30 | 4,409.6 | |
| docs/en/mkdocs.yml | 333 | 143 | 42 | 2,609.5 | |
| fastapi/openapi/utils.py | 679 | 89 | 33 | 2,319.1 | |
| .github/workflows/test.yml | 332 | 107 | 13 | 1,949.6 | |
| scripts/docs.py | 919 | 63 | 6 | 1,909.8 | |
| fastapi/__init__.py | 25 | 335 | 2 | 1,675.0 | |
| docs/en/docs/index.md | 581 | 69 | 24 | 1,663.2 | |
| docs/en/data/people.yml | 774 | 56 | 1 | 1,558.0 | |
| fastapi/security/oauth2.py | 693 | 48 | 21 | 1,263.6 | |
| fastapi/param_functions.py | 2,460 | 25 | 10 | 1,240.0 | |
| docs/pt/docs/index.md | 581 | 48 | 23 | 1,157.0 | |
| docs/es/docs/index.md | 581 | 47 | 20 | 1,132.9 | |
| fastapi/encoders.py | 366 | 58 | 28 | 1,109.6 | |
| fastapi/params.py | 754 | 37 | 13 | 1,016.0 | |
| docs/ru/docs/index.md | 581 | 42 | 19 | 1,012.4 | |
| docs/zh/docs/index.md | 581 | 41 | 20 | 988.3 | |
| fastapi/openapi/models.py | 435 | 47 | 13 | 980.3 | |
| .github/workflows/build-docs.yml | 129 | 84 | 7 | 954.1 | |
| docs/ko/docs/index.md | 581 | 39 | 20 | 940.1 | |
| docs/tr/docs/index.md | 581 | 38 | 17 | 915.9 | |
| docs/en/data/sponsors.yml | 59 | 118 | 4 | 906.4 | |
| tests/test_application.py | 1,285 | 25 | 14 | 896.2 | |
| docs/en/docs/tutorial/query-params-str-validations.md | 450 | 41 | 17 | 869.7 | |
| docs/en/data/translation_reviewers.yml | 1,885 | 20 | 1 | 868.3 | |
| docs/fr/docs/index.md | 581 | 36 | 18 | 867.7 | |
| docs/uk/docs/index.md | 581 | 36 | 17 | 867.7 | |
| .pre-commit-config.yaml | 108 | 83 | 5 | 862.6 | |
| docs/de/docs/index.md | 581 | 34 | 16 | 819.5 | |
| docs/ja/docs/index.md | 581 | 34 | 18 | 819.5 | |
| fastapi/utils.py | 136 | 67 | 27 | 781.3 | |
| docs/en/data/github_sponsors.yml | 331 | 42 | 1 | 764.1 | |
| docs/en/docs/tutorial/bigger-applications.md | 547 | 32 | 10 | 748.4 | |
| docs/en/overrides/main.html | 98 | 74 | 4 | 732.6 | |
| docs/en/docs/css/custom.css | 558 | 30 | 4 | 708.7 | |
| docs/en/docs/tutorial/sql-databases.md | 357 | 37 | 23 | 699.1 | |
| tests/test_include_router_defaults_overrides.py | 7,304 | 8 | 3 | 683.7 | |
| scripts/translate.py | 489 | 30 | 2 | 663.4 | |
| docs/en/docs/async.md | 444 | 31 | 20 | 653.2 | |
| fastapi/security/http.py | 417 | 31 | 14 | 633.0 | |
| docs/en/docs/python-types.md | 348 | 33 | 13 | 615.6 | |
| docs/en/docs/tutorial/response-model.md | 344 | 33 | 13 | 612.1 | |
| fastapi/openapi/docs.py | 389 | 31 | 18 | 611.4 | |
| docs/en/docs/deployment/docker.md | 614 | 24 | 8 | 594.7 | |
| fastapi/_compat/v2.py | 493 | 26 | 5 | 577.3 | |
| tests/test_jsonable_encoder.py | 345 | 30 | 17 | 557.2 | |
| docs/en/data/topic_repos.yml | 496 | 25 | 3 | 556.8 | |
| docs/en/docs/alternatives.md | 485 | 25 | 10 | 550.6 | |
| docs/en/docs/advanced/settings.md | 326 | 30 | 9 | 541.7 | |
| tests/test_tutorial/test_bigger_applications/test_main.py | 606 | 22 | 8 | 541.6 | |
| tests/test_tutorial/test_security/test_tutorial005.py | 432 | 26 | 12 | 540.4 | |
| docs/en/docs/advanced/behind-a-proxy.md | 466 | 25 | 11 | 539.7 | |
| docs/en/docs/tutorial/first-steps.md | 427 | 26 | 8 | 537.3 | |
| docs/en/docs/tutorial/security/oauth2-jwt.md | 277 | 32 | 16 | 532.6 | |
| tests/test_tutorial/test_body/test_tutorial001.py | 346 | 28 | 11 | 520.8 | |
| tests/test_response_model_as_return_annotation.py | 1,121 | 15 | 4 | 502.2 | |
| fastapi/dependencies/models.py | 234 | 32 | 9 | 489.5 | |
| docs/en/data/contributors.yml | 595 | 20 | 1 | 487.9 | |
| .github/workflows/deploy-docs.yml | 84 | 53 | 6 | 485.8 | |
| fastapi/security/api_key.py | 320 | 27 | 10 | 483.0 | |
| docs/en/data/translators.yml | 555 | 20 | 1 | 471.2 | |
| docs/en/docs/tutorial/dependencies/dependencies-with-yield.md | 290 | 27 | 7 | 459.8 | |
| docs/zh-hant/docs/index.md | 581 | 19 | 10 | 458.0 | |
| docs/en/docs/tutorial/schema-extra-example.md | 202 | 32 | 11 | 454.8 | |
| fastapi/exceptions.py | 256 | 28 | 11 | 448.0 | |
| docs/en/docs/advanced/custom-response.md | 273 | 27 | 13 | 446.1 | |
| tests/test_schema_extra_examples.py | 857 | 15 | 6 | 439.1 | |
| docs/en/docs/tutorial/handling-errors.md | 244 | 28 | 17 | 437.4 | |
| docs/en/docs/tutorial/testing.md | 193 | 31 | 10 | 430.7 | |
| docs/en/docs/advanced/security/oauth2-scopes.md | 274 | 25 | 14 | 413.8 | |
| docs/en/docs/advanced/generate-clients.md | 192 | 29 | 9 | 401.8 | |
| docs/es/docs/async.md | 444 | 19 | 10 | 400.4 | |
| docs/ru/docs/deployment/docker.md | 614 | 16 | 7 | 396.5 | |
| docs/en/docs/advanced/websockets.md | 186 | 29 | 10 | 395.5 | |
| docs/en/docs/tutorial/security/first-steps.md | 203 | 27 | 11 | 384.7 | |
| docs/zh/docs/tutorial/query-params-str-validations.md | 450 | 18 | 8 | 381.8 | |
| docs/en/docs/tutorial/body.md | 166 | 29 | 14 | 373.6 | |
| docs/es/docs/tutorial/first-steps.md | 427 | 18 | 8 | 372.0 | |
| tests/test_tutorial/test_request_files/test_tutorial001.py | 216 | 25 | 7 | 367.4 | |
| tests/test_extra_routes.py | 370 | 19 | 8 | 365.5 | |
| docs/ru/docs/tutorial/query-params-str-validations.md | 449 | 17 | 4 | 360.2 | |
| docs/en/docs/tutorial/request-files.md | 176 | 27 | 10 | 358.2 | |
| docs/en/docs/tutorial/body-nested-models.md | 221 | 24 | 10 | 356.8 | |
| .github/workflows/smokeshow.yml | 59 | 46 | 3 | 353.3 | |
| .github/workflows/translate.yml | 148 | 29 | 3 | 352.8 | |
| docs/pt/docs/alternatives.md | 485 | 16 | 8 | 352.4 | |
| tests/test_tutorial/test_security/test_tutorial003.py | 215 | 24 | 11 | 351.9 | |
| tests/test_security_oauth2.py | 280 | 21 | 10 | 351.4 | |
| docs/zh/docs/tutorial/bigger-applications.md | 547 | 15 | 4 | 350.8 | |
| tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py | 245 | 22 | 7 | 344.4 | |
| .github/workflows/publish.yml | 37 | 56 | 4 | 340.6 | |
| docs/zh/docs/tutorial/sql-databases.md | 357 | 18 | 9 | 340.1 | |
| tests/test_security_oauth2_optional.py | 281 | 20 | 9 | 335.3 | |
| docs/en/docs/tutorial/extra-models.md | 211 | 23 | 8 | 334.1 | |
| docs/en/docs/tutorial/dependencies/index.md | 250 | 21 | 7 | 332.0 |