anthropics/anthropic-sdk-python
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 1,863 files with 74,899 lines of code.
- 5 very long files (6,912 lines of code)
- 22 long files (14,057 lines of code)
- 75 medium size files (26,760 lines of code)
- 37 small files (5,140 lines of code)
- 1,724 very small files (22,030 lines of code)
Legend:
1001+
501-1000
201-500
101-200
1-100
explore: grouped by folders | grouped by size | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
File Size per Logical Decomposition
primary
Longest Files (Top 50)
| File | # lines | # units |
|---|---|---|
| 1899 | 109 | |
| 1670 | 34 | |
| 1224 | - | |
| 1076 | 66 | |
| 1043 | 24 | |
| 913 | 21 | |
| 825 | 17 | |
| 782 | 76 | |
| 742 | 16 | |
| 729 | 33 | |
| 720 | 47 | |
| 639 | 34 | |
| 637 | 27 | |
| 627 | 31 | |
| 620 | 21 | |
| 599 | 32 | |
| 594 | 21 | |
| 592 | 20 | |
| 586 | 7 | |
| 580 | 33 | |
| 578 | 21 | |
| 578 | 14 | |
| 574 | 15 | |
| 560 | 14 | |
| 546 | 23 | |
| 532 | 14 | |
| 504 | 20 | |
| 498 | 14 | |
| 498 | 14 | |
| 497 | 47 | |
| 493 | 14 | |
| 493 | 12 | |
| 486 | 14 | |
| 478 | 99 | |
| 462 | 13 | |
| 462 | 32 | |
| 456 | 20 | |
| 453 | 14 | |
| 451 | 32 | |
| 447 | 14 | |
| 443 | 20 | |
| 439 | 20 | |
| 438 | 15 | |
| 434 | 19 | |
| 433 | 26 | |
| 429 | 26 | |
| 427 | 100 | |
| 427 | 14 | |
| 423 | 13 | |
| 421 | 15 |
Large Files That Change Often (Top 20)
To change a file, an AI coding agent (or a person) has to read it: these files are read the most for the changes in the past year (lines × changes).
| File | # lines | ≈ tokens to read | # changes (1y) | ≈ lines edited per change | lines read per line changed |
|---|---|---|---|---|---|
| 1670 | ~10k–30k | 49 | ~100 | ~15 | |
| 1224 | ~7k–20k | 56 | ~20 | ~70 | |
| 1899 | ~10k–30k | 25 | ~50 | ~30 | |
| 1043 | ~7k–15k | 43 | ~100 | ~10 | |
| 720 | ~5k–15k | 31 | ~70 | ~10 | |
| 782 | ~5k–15k | 24 | ~30 | ~20 | |
| 729 | ~5k–15k | 22 | ~70 | ~10 | |
| 913 | ~5k–15k | 17 | ~100 | ~7 | |
| 1076 | ~7k–20k | 13 | ~150 | ~7 | |
| 825 | ~5k–15k | 15 | ~150 | ~7 | |
| 532 | ~3k–10k | 23 | ~150 | ~3 | |
| 592 | ~3k–10k | 18 | ~100 | ~7 | |
| 742 | ~5k–15k | 14 | ~100 | ~7 | |
| 493 | ~3k–7k | 20 | ~70 | ~7 | |
| 578 | ~3k–10k | 17 | ~100 | ~5 | |
| 574 | ~3k–10k | 17 | ~50 | ~10 | |
| 380 | ~2k–7k | 25 | ~7 | ~50 | |
| 580 | ~3k–10k | 16 | ~100 | ~7 | |
| 498 | ~3k–7k | 18 | ~100 | ~5 | |
| 381 | ~2k–7k | 22 | ~50 | ~7 |
Tokens are lines × 7 to 14 (analysis.fileReadsForChanges). Lines edited per change are the file's lines added and deleted divided by its commits over the whole history. Agents read about 2,000 lines at a time: when a 17,000-line file was split into modules, the tokens an agent read for the same change fell by 83% (The Economic Benefit of Refactoring, 2026).
Files With Most Units (Top 50)
| File | # lines | # units |
|---|---|---|
| 1899 | 109 | |
| 427 | 100 | |
| 478 | 99 | |
| 782 | 76 | |
| 316 | 74 | |
| 1076 | 66 | |
| 322 | 63 | |
| 497 | 47 | |
| 720 | 47 | |
| 273 | 38 | |
| 1670 | 34 | |
| 639 | 34 | |
| 729 | 33 | |
| 580 | 33 | |
| 451 | 32 | |
| 599 | 32 | |
| 462 | 32 | |
| 627 | 31 | |
| 637 | 27 | |
| 396 | 27 | |
| 393 | 27 | |
| 433 | 26 | |
| 390 | 26 | |
| 429 | 26 | |
| 354 | 25 | |
| 1043 | 24 | |
| 188 | 24 | |
| 283 | 23 | |
| 546 | 23 | |
| 148 | 23 | |
| 578 | 21 | |
| 913 | 21 | |
| 620 | 21 | |
| 594 | 21 | |
| 386 | 20 | |
| 439 | 20 | |
| 82 | 20 | |
| 443 | 20 | |
| 350 | 20 | |
| 504 | 20 | |
| 82 | 20 | |
| 592 | 20 | |
| 456 | 20 | |
| 418 | 19 | |
| 345 | 19 | |
| 434 | 19 | |
| 355 | 18 | |
| 185 | 17 | |
| 825 | 17 | |
| 742 | 16 |
Files With Long Lines (Top 23)
There are 23 files with lines longer than 120 characters. In total, there are 96 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 1670 | 34 | 17 | |
| 1224 | - | 13 | |
| 1043 | 24 | 12 | |
| 331 | 13 | 6 | |
| 1899 | 109 | 5 | |
| 393 | 27 | 5 | |
| 497 | 47 | 4 | |
| 385 | 11 | 4 | |
| 342 | 13 | 4 | |
| 782 | 76 | 3 | |
| 720 | 47 | 3 | |
| 390 | 26 | 3 | |
| 429 | 26 | 3 | |
| 64 | 4 | 2 | |
| 68 | 4 | 2 | |
| 627 | 31 | 2 | |
| 358 | 13 | 2 | |
| 103 | - | 1 | |
| 116 | 12 | 1 | |
| 1076 | 66 | 1 | |
| 63 | 10 | 1 | |
| 289 | 12 | 1 | |
| 101 | 6 | 1 |
Correlations
File Size vs. Commits (all time): 1863 points
|
|
1899.0 | lines of code min: 1.0average: 40.2 25th percentile: 6.0 median: 9.0 75th percentile: 16.0 max: 1899.0 |
|
| 0 | 265.0 | ||
|
commits (all time) min: 1.0 | average: 5.24 | 25th percentile: 3.0 | median: 3.0 | 75th percentile: 5.0 | max: 265.0
|
|||
File Size vs. Contributors (all time): 1863 points
|
|
1899.0 | lines of code min: 1.0average: 40.2 25th percentile: 6.0 median: 9.0 75th percentile: 16.0 max: 1899.0 |
|
| 0 | 18.0 | ||
|
contributors (all time) min: 1.0 | average: 3.17 | 25th percentile: 2.0 | median: 3.0 | 75th percentile: 4.0 | max: 18.0
|
|||
File Size vs. Commits (30 days): 1812 points
|
|
1899.0 | lines of code min: 1.0average: 39.2 25th percentile: 6.0 median: 9.0 75th percentile: 16.0 max: 1899.0 |
|
| 0 | 22.0 | ||
|
commits (30d) min: 1.0 | average: 2.04 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 22.0
|
|||
File Size vs. Contributors (30 days): 1812 points
|
|
1899.0 | lines of code min: 1.0average: 39.2 25th percentile: 6.0 median: 9.0 75th percentile: 16.0 max: 1899.0 |
|
| 0 | 8.0 | ||
|
contributors (30d) min: 1.0 | average: 1.76 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 8.0
|
|||
File Size vs. Commits (90 days): 1837 points
|
|
1899.0 | lines of code min: 1.0average: 40.3 25th percentile: 6.0 median: 9.0 75th percentile: 16.0 max: 1899.0 |
|
| 0 | 64.0 | ||
|
commits (90d) min: 1.0 | average: 3.45 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 4.0 | max: 64.0
|
|||
File Size vs. Contributors (90 days): 1837 points
|
|
1899.0 | lines of code min: 1.0average: 40.3 25th percentile: 6.0 median: 9.0 75th percentile: 16.0 max: 1899.0 |
|
| 0 | 8.0 | ||
|
contributors (90d) min: 1.0 | average: 2.64 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 3.0 | max: 8.0
|
|||
About This Analysis
- File size measurements show the distribution of size of files.
- Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
- It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
- To learn more about bloaters and how to deal with long code structures, Sokrates recommends the following resources:
- Refactoring bloaters, sourcemaking.com
- The Blob Software Development Anti-Pattern, sourcemaking.com