# python/cpython SLOC report

> As of 2026-08-31 (commit 03503dccd0aa), python/cpython contains 2,163,559 total lines: 1,623,307 code, 237,418 comments, 302,834 blank, across 3,999 files in 36 languages (top: C 31.3%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving python/cpython to commit 03503dccd0aa, 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 very large codebase by counted code lines. Code represents 75.0% of all lines, comments represent 11.0%, and the repository averages 406 code lines per file. C accounts for 31.3% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 479 | 653,040 | 507,463 | 81,036 | 64,541 |
| ReStructuredText | 1,450 | 516,844 | 367,496 | 0 | 149,348 |
| Python | 1,031 | 426,335 | 345,085 | 31,428 | 49,822 |
| C Header | 639 | 384,347 | 333,707 | 18,647 | 31,993 |
| XML | 61 | 31,375 | 31,294 | 18 | 63 |
| Visual Studio Project | 54 | 7,803 | 7,757 | 8 | 38 |
| Autoconf | 16 | 7,038 | 4,369 | 1,401 | 1,268 |
| TOML | 9 | 3,976 | 3,582 | 165 | 229 |
| JavaScript | 16 | 4,427 | 3,531 | 376 | 520 |
| HTML | 18 | 3,533 | 3,293 | 53 | 187 |
| CSS | 7 | 4,046 | 3,216 | 247 | 583 |
| JSON | 14 | 3,104 | 3,101 | 0 | 3 |

Top language (C 31.3%). Generated at 2026-08-31T09:50:38.618984784+00:00. Canonical report: https://octocounts.com/github/python/cpython

## Report FAQ

### How many lines of code does python/cpython have?

python/cpython has 2,163,559 total lines, including 1,623,307 code lines, 237,418 comment lines, and 302,834 blank lines.

### How was the python/cpython line count measured?

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

### What commit was counted for python/cpython?

This OctoCounts report was generated from main at commit 03503dccd0aa on 2026-08-31T09:50:38.618984784+00:00.

## Similar repository reports

- [postgres/postgres](https://octocounts.com/github/postgres/postgres) — C, 1,635,077 code lines
- [plan9foundation/plan9](https://octocounts.com/github/plan9foundation/plan9) — C, 1,659,936 code lines
- [bminor/glibc](https://octocounts.com/github/bminor/glibc) — C, 1,677,401 code lines
- [FFmpeg/FFmpeg](https://octocounts.com/github/FFmpeg/FFmpeg) — C, 1,552,973 code lines
- [php/php-src](https://octocounts.com/github/php/php-src) — C, 1,785,546 code lines
- [apple-oss-distributions/xnu](https://octocounts.com/github/apple-oss-distributions/xnu) — C, 1,411,712 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)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [OctoCounts API docs](https://octocounts.com/docs/api)
