# fastapi/fastapi SLOC report

> As of 2026-09-21 (commit 50113da16fec), fastapi/fastapi contains 367,051 total lines: 117,708 code, 132,829 comments, 116,514 blank, across 2,910 files in 9 languages (top: Python 83.3%). Default configuration. Counted with tokei via OctoCounts.

fastapi/fastapi has 117,708 source lines of code out of 367,051 total lines across 2,910 files, counted from the master ref at commit 50113da16fec by the OctoCounts tokei engine on 2026-09-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving fastapi/fastapi to commit 50113da16fec, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a large codebase by counted code lines. Code represents 32.1% of all lines, comments represent 36.2%, and the repository averages 40 code lines per file. Python accounts for 83.3% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Python | 1,138 | 112,998 | 98,033 | 751 | 14,214 |
| SVG | 56 | 12,817 | 12,815 | 1 | 1 |
| YAML | 13 | 5,325 | 5,318 | 7 | 0 |
| CSS | 3 | 674 | 551 | 38 | 85 |
| JavaScript | 4 | 581 | 463 | 72 | 46 |
| TOML | 1 | 400 | 339 | 33 | 28 |
| HTML | 5 | 173 | 170 | 0 | 3 |
| Shell | 5 | 33 | 19 | 5 | 9 |
| Markdown | 1,685 | 234,050 | 0 | 131,922 | 102,128 |

Top language (Python 83.3%). Generated at 2026-09-21T21:10:31.415256943+00:00. Canonical report: https://octocounts.com/github/fastapi/fastapi

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/fastapi/fastapi/commit/50113da16fec53b66b80d75e80a89296de4fa5a5?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Atrue%2C%22includeTests%22%3Atrue%2C%22includeGenerated%22%3Atrue%7D).

## Report FAQ

### How many lines of code does fastapi/fastapi have?

fastapi/fastapi has 367,051 total lines, including 117,708 code lines, 132,829 comment lines, and 116,514 blank lines.

### How was the fastapi/fastapi line count measured?

OctoCounts resolved the public GitHub repository to commit 50113da16fec, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for fastapi/fastapi?

This OctoCounts report was generated from master at commit 50113da16fec on 2026-09-21T21:10:31.415256943+00:00.

## Similar repository reports

- [verl-project/verl](https://octocounts.com/github/verl-project/verl) — Python, 116,346 code lines
- [FlagOpen/FlagEmbedding](https://octocounts.com/github/FlagOpen/FlagEmbedding) — Python, 115,659 code lines
- [SanAntonio021/agents-skills](https://octocounts.com/github/SanAntonio021/agents-skills) — Python, 114,897 code lines
- [pypa/pip](https://octocounts.com/github/pypa/pip) — Python, 120,992 code lines
- [google/artemis](https://octocounts.com/github/google/artemis) — Python, 113,299 code lines
- [microsoft/autogen](https://octocounts.com/github/microsoft/autogen) — Python, 111,392 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Django vs Ruby on Rails](https://octocounts.com/compare/django-vs-rails)
- [Laravel vs Django](https://octocounts.com/compare/laravel-vs-django)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
