The largest Python repositories by lines of code

OctoCounts has measured 1,967 public GitHub repositories whose primary programming language is Python. jaredpalmer/kev is the largest, with 29,909,556 code lines across 2,645 files, counted with tokei on November 20, 2026. The table ranks the 50 largest by code lines; each row links to a report pinned to the commit it counted.

RankRepositoryCode linesTotal linesFilesPython share
1jaredpalmer/kev29,909,55629,919,4802,6450.1%
2CrocSwap/integer-mult-bounds22,919,01223,532,08825,4903.3%
3tatsu-lab/alpaca_eval16,080,51916,086,5921,0050.0%
4PostHog/posthog9,495,88611,196,85957,19236.2%
5lianqingsec/NucleiPocGather9,273,16610,308,126139,5830.0%
6bojieli/ai-agent-book8,881,1829,419,2618,3483.2%
7reppiks490/Icarus-engine8,161,3878,188,38743,4070.6%
8girl15year/destroylist7,884,53612,104,6955960.0%
9Guo-lab/CS336-Language-Modeling4,099,2394,541,1603660.3%
10amzxyz/rime-wanxiang-data3,575,4903,775,3912890.9%
11BasedHardware/omi3,425,3064,292,27213,88025.0%
12zechengtang/Spark-H32,837,5274,219,6925462.9%
13pytorch/pytorch2,681,0193,419,4539,11647.7%
14WeblateOrg/weblate2,524,0054,154,7222,02711.9%
15daha1216/dsh-adult-tension2,486,6992,496,8549360.6%
16BerriAI/litellm2,326,6202,721,7649,65743.6%
17lexifina/global-law2,307,0553,168,44913,84511.4%
18pytorch/executorch2,285,1762,588,1576,98921.4%
19NousResearch/hermes-agent2,242,8933,027,01913,95142.2%
20BAITC-Hacks/hack-96839d9e-hustlers2,167,6112,168,6658,0090.2%
21baserow/baserow2,065,9882,209,2019,08018.8%
22beenuar/AiSOC2,063,9722,284,77911,17122.0%
23dabiziluzhu55/citypulse-v2x-sim2,060,8532,094,7411,2006.4%
24sgl-project/sglang2,036,6302,398,3906,79981.9%
25frappe/erpnext2,007,4234,254,0345,79822.5%
26Opentrons/opentrons1,951,3662,122,5087,84422.2%
27unslothai/unsloth1,821,1502,105,0704,38254.6%
28vllm-project/vllm1,785,1032,103,8455,89472.7%
29home-assistant/core1,746,7032,058,15615,93683.5%
30mlflow/mlflow1,605,5711,953,7955,61223.2%
31blitzy-public-samples/erpnext1,564,7763,252,6395,35718.9%
32insightlabs38-pixel/HydroSwarm1,531,3441,569,7711,4626.0%
33tryton/tryton1,523,7502,003,9899,84612.7%
34Significant-Gravitas/AutoGPT1,505,5021,800,1108,08068.4%
35agentscope-ai/QwenPaw1,499,3651,848,9375,10938.7%
36langgenius/dify1,407,0981,645,60111,03534.3%
37hashgraph-online/awesome-codex-plugins1,400,8693,482,49019,05141.1%
38Comfy-Org/ComfyUI1,373,8241,927,8131,22721.5%
39omnigent-ai/omnigent1,367,4641,684,3594,73343.9%
40onyx-dot-app/onyx1,360,4591,612,4387,24034.6%
41usmanxg58-byte/AgentFOXXY1,357,0321,981,2375,43157.9%
42Klotzkette/claude-fuer-deutsches-recht1,334,6264,040,23935,78215.4%
43MakazhanAlpamys/Soup1,322,9161,429,4102,14921.9%
44houmo-ai/postmo-quantflow1,321,3861,485,6493,15780.5%
45frappe/frappe1,320,8272,749,6725,14217.6%
46pnotisdev/cicada33011,271,4761,459,9455,8044.6%
47rohitg00/ai-engineering-from-scratch1,259,3751,730,50711,18817.8%
48FeatherHunter/dsh-opencode-palette1,207,5961,221,1484582.1%
49sickn33/agentic-awesome-skills1,193,1255,081,07530,44334.3%
50freeipa/freeipa1,188,4991,565,1711,60933.6%

Ranking rule: a repository belongs to Python when Python is its largest programming language by code lines; data and prose formats such as JSON, YAML, TOML and Markdown do not count as a language for this rule. "Python share" is the share of the repository's code lines written in Python. Code lines exclude comments and blank lines. Every report uses OctoCounts' canonical public options, with tests, docs and generated directories excluded, and reports were generated on different dates.

Python leaderboard FAQ

Which Python repository has the most lines of code?

jaredpalmer/kev is the largest Python repository in OctoCounts' index, with 29,909,556 code lines out of 29,919,480 total lines across 2,645 files, counted on November 20, 2026. CrocSwap/integer-mult-bounds follows with 22,919,012 code lines. Code size is not code quality: a larger count only means more source material.

How does a repository join the Python leaderboard?

Python must be its primary programming language: the language with the most code lines in the repository's OctoCounts report, ignoring data and prose formats such as JSON, YAML, TOML and Markdown. The repository then needs a public report with at least 5 files, and it is listed when it is among the 50 largest by code lines.

How many Python repositories has OctoCounts measured?

1,967 public GitHub repositories have Python as their primary programming language in OctoCounts' index. This page lists the 50 largest by code lines; a repository analyzed with custom counting options keeps those counts as a separate saved result.

Does more source lines of code mean more complexity?

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 line counts to gauge the scale of what you would be reading or maintaining, not as a quality signal.

Curated comparisons in Python