This page compares the source lines of code (SLOC) of fastapi/fastapi and pallets/flask using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-08-26, fastapi/fastapi contains 35,047 total lines (29,612 code) across 544 files, while pallets/flask contains 12,777 total lines (10,176 code) across 61 files as of 2026-08-26. fastapi/fastapi is about 2.9x the size of pallets/flask by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | fastapi/fastapi | pallets/flask |
|---|---|---|
| Files | 544 | 61 |
| Total lines | 35,047 | 12,777 |
| Code lines | 29,612 | 10,176 |
| Comment lines | 1,073 | 793 |
| Blank lines | 4,362 | 1,808 |
| Languages counted | 7 | 8 |
Top languages in fastapi/fastapi: Python (98.6% of code), TOML (1.1% of code), JavaScript (0.1% of code). Top languages in pallets/flask: Python (78.7% of code), ReStructuredText (14.5% of code), TOML (3.3% of code). Python, TOML, HTML appear in both top language lists; JavaScript, Shell appear only in fastapi/fastapi's top languages; ReStructuredText, CSS appear only in pallets/flask's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. fastapi/fastapi was counted at ref master (commit 49033471594e) on 2026-08-26; pallets/flask was counted at ref main (commit d318b6834711) on 2026-08-26. See the counting methodology for ignored directories and analysis options.
Evidence and next steps:
Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.
fastapi/fastapi has more code: 29,612 code lines versus 10,176 for pallets/flask, about 2.9x as much, based on cached OctoCounts reports as of 2026-08-26.
Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for fastapi/fastapi, pallets/flask, or any repository.
Methodology: both counts come from cached OctoCounts reports generated with tokei. fastapi/fastapi was counted at ref master (commit 49033471594e) on 2026-08-26; pallets/flask was counted at ref main (commit d318b6834711) on 2026-08-26. See the counting methodology for ignored directories and analysis options.
Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.