anthropics / redis-py
File Size

The distribution of size of files (measured in lines of code).

Intro
  • 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...
File Size Overall
  • There are 119 files with 21,380 lines of code.
    • 6 very long files (9,146 lines of code)
    • 3 long files (2,225 lines of code)
    • 16 medium size files (4,180 lines of code)
    • 18 small files (2,772 lines of code)
    • 76 very small files (3,057 lines of code)
42% | 10% | 19% | 12% | 14%
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
py42% | 10% | 19% | 12% | 14%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
redis49% | 12% | 19% | 10% | 8%
doctests0% | 0% | 19% | 31% | 48%
benchmarks0% | 0% | 37% | 24% | 38%
ROOT0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
core.py
in redis/commands
3073 347
cluster.py
in redis
1678 118
1212 109
cluster.py
in redis/asyncio
1101 45
client.py
in redis
1047 92
client.py
in redis/asyncio
1035 36
connection.py
in redis/asyncio
969 47
helpers.py
in redis/_parsers
676 51
commands.py
in redis/commands/search
580 44
commands.py
in redis/commands/timeseries
483 37
cluster.py
in redis/commands
423 44
cache.py
in redis
314 52
sentinel.py
in redis
269 26
event.py
in redis
255 38
sentinel.py
in redis/asyncio
247 12
239 -
token_manager.py
in redis/auth
235 24
dt_json.py
in doctests
224 -
cluster_async.py
in benchmarks
222 1
commands.py
in redis/commands/json
219 28
query.py
in redis/commands/search
217 30
ocsp.py
in redis
215 13
commands.py
in redis/commands/bf
210 49
resp3.py
in redis/_parsers
206 10
utils.py
in redis
202 19
base.py
in redis/_parsers
186 13
commands.py
in redis/commands/vectorset
183 11
dt_list.py
in doctests
182 -
lock.py
in redis
173 14
hiredis.py
in redis/_parsers
173 10
aggregation.py
in redis/commands/search
170 24
commands.py
in redis/_parsers
170 7
search_vss.py
in doctests
170 1
dt_stream.py
in doctests
164 -
lock.py
in redis/asyncio
163 5
__init__.py
in redis/commands/bf
154 16
basic_operations.py
in benchmarks
148 12
querystring.py
in redis/commands/search
145 36
__init__.py
in redis/commands/search
128 8
dt_vec_set.py
in doctests
127 -
field.py
in redis/commands/search
123 9
socket.py
in redis/_parsers
110 10
geo_index.py
in doctests
103 -
info.py
in redis/commands/bf
97 13
token.py
in redis/auth
95 24
__init__.py
in redis/commands/json
92 4
resp2.py
in redis/_parsers
92 2
cmds_generic.py
in doctests
90 -
88 6
87 1
Files With Most Units (Top 50)
File# lines# units
core.py
in redis/commands
3073 347
cluster.py
in redis
1678 118
1212 109
client.py
in redis
1047 92
cache.py
in redis
314 52
helpers.py
in redis/_parsers
676 51
commands.py
in redis/commands/bf
210 49
connection.py
in redis/asyncio
969 47
cluster.py
in redis/asyncio
1101 45
cluster.py
in redis/commands
423 44
commands.py
in redis/commands/search
580 44
event.py
in redis
255 38
commands.py
in redis/commands/timeseries
483 37
querystring.py
in redis/commands/search
145 36
client.py
in redis/asyncio
1035 36
query.py
in redis/commands/search
217 30
commands.py
in redis/commands/json
219 28
sentinel.py
in redis
269 26
aggregation.py
in redis/commands/search
170 24
token.py
in redis/auth
95 24
token_manager.py
in redis/auth
235 24
utils.py
in redis
202 19
backoff.py
in redis
57 17
__init__.py
in redis/commands/bf
154 16
lock.py
in redis
173 14
sentinel.py
in redis/commands
31 13
info.py
in redis/commands/bf
97 13
base.py
in redis/_parsers
186 13
ocsp.py
in redis
215 13
basic_operations.py
in benchmarks
148 12
reducers.py
in redis/commands/search
68 12
sentinel.py
in redis/asyncio
247 12
commands.py
in redis/commands/vectorset
183 11
redismodules.py
in redis/commands
43 10
socket.py
in redis/_parsers
110 10
hiredis.py
in redis/_parsers
173 10
resp3.py
in redis/_parsers
206 10
tasks.py
in root
67 9
field.py
in redis/commands/search
123 9
helpers.py
in redis/commands
76 8
__init__.py
in redis/commands/search
128 8
index_definition.py
in redis/commands/search
58 7
commands.py
in redis/_parsers
170 7
88 6
33 6
base.py
in benchmarks
34 5
utils.py
in redis/commands/timeseries
30 5
lock.py
in redis/asyncio
163 5
76 4
__init__.py
in redis/commands/json
92 4
Files With Long Lines (Top 2)

There are 2 files with lines longer than 120 characters. In total, there are 5 long lines.

File# lines# units# long lines
tasks.py
in root
67 9 4
1212 109 1
Correlations

File Size vs. Commits (all time): 119 points

redis/_parsers/resp3.py x: 10 commits (all time) y: 206 lines of code doctests/dt_vec_set.py x: 1 commits (all time) y: 127 lines of code redis/commands/redismodules.py x: 14 commits (all time) y: 43 lines of code redis/commands/vectorset/__init__.py x: 1 commits (all time) y: 36 lines of code redis/commands/vectorset/commands.py x: 1 commits (all time) y: 183 lines of code redis/commands/vectorset/utils.py x: 1 commits (all time) y: 52 lines of code redis/asyncio/sentinel.py x: 16 commits (all time) y: 247 lines of code redis/sentinel.py x: 58 commits (all time) y: 269 lines of code redis/commands/core.py x: 131 commits (all time) y: 3073 lines of code redis/asyncio/connection.py x: 75 commits (all time) y: 969 lines of code redis/connection.py x: 364 commits (all time) y: 1212 lines of code redis/asyncio/client.py x: 63 commits (all time) y: 1035 lines of code redis/asyncio/cluster.py x: 54 commits (all time) y: 1101 lines of code redis/client.py x: 848 commits (all time) y: 1047 lines of code redis/cluster.py x: 94 commits (all time) y: 1678 lines of code redis/utils.py x: 39 commits (all time) y: 202 lines of code redis/backoff.py x: 6 commits (all time) y: 57 lines of code redis/commands/search/commands.py x: 37 commits (all time) y: 580 lines of code redis/commands/cluster.py x: 30 commits (all time) y: 423 lines of code doctests/geo_index.py x: 1 commits (all time) y: 103 lines of code redis/commands/helpers.py x: 19 commits (all time) y: 76 lines of code tasks.py x: 25 commits (all time) y: 67 lines of code redis/asyncio/lock.py x: 9 commits (all time) y: 163 lines of code redis/exceptions.py x: 48 commits (all time) y: 76 lines of code redis/lock.py x: 49 commits (all time) y: 173 lines of code benchmarks/basic_operations.py x: 17 commits (all time) y: 148 lines of code benchmarks/command_packer_benchmark.py x: 18 commits (all time) y: 88 lines of code benchmarks/socket_read_size.py x: 4 commits (all time) y: 19 lines of code redis/_parsers/base.py x: 6 commits (all time) y: 186 lines of code redis/asyncio/utils.py x: 2 commits (all time) y: 14 lines of code redis/auth/token.py x: 3 commits (all time) y: 95 lines of code redis/ocsp.py x: 8 commits (all time) y: 215 lines of code redis/__init__.py x: 124 commits (all time) y: 74 lines of code doctests/dt_list.py x: 2 commits (all time) y: 182 lines of code doctests/query_agg.py x: 3 commits (all time) y: 58 lines of code doctests/query_combined.py x: 3 commits (all time) y: 71 lines of code doctests/query_ft.py x: 3 commits (all time) y: 40 lines of code doctests/search_quickstart.py x: 3 commits (all time) y: 239 lines of code doctests/search_vss.py x: 3 commits (all time) y: 170 lines of code redis/commands/search/query.py x: 11 commits (all time) y: 217 lines of code redis/commands/search/profile_information.py x: 1 commits (all time) y: 7 lines of code doctests/home_json.py x: 1 commits (all time) y: 78 lines of code doctests/cmds_cnxmgmt.py x: 1 commits (all time) y: 15 lines of code doctests/cmds_list.py x: 1 commits (all time) y: 65 lines of code redis/commands/search/aggregation.py x: 12 commits (all time) y: 170 lines of code redis/typing.py x: 13 commits (all time) y: 45 lines of code redis/auth/token_manager.py x: 1 commits (all time) y: 235 lines of code redis/credentials.py x: 2 commits (all time) y: 33 lines of code redis/event.py x: 1 commits (all time) y: 255 lines of code doctests/trans_pipe.py x: 1 commits (all time) y: 44 lines of code redis/_parsers/helpers.py x: 15 commits (all time) y: 676 lines of code doctests/dt_set.py x: 4 commits (all time) y: 84 lines of code redis/cache.py x: 4 commits (all time) y: 314 lines of code doctests/cmds_generic.py x: 1 commits (all time) y: 90 lines of code redis/commands/timeseries/commands.py x: 10 commits (all time) y: 483 lines of code redis/commands/bf/commands.py x: 17 commits (all time) y: 210 lines of code redis/commands/timeseries/info.py x: 7 commits (all time) y: 44 lines of code redis/commands/search/_util.py x: 3 commits (all time) y: 7 lines of code redis/commands/search/result.py x: 7 commits (all time) y: 59 lines of code redis/_parsers/hiredis.py x: 4 commits (all time) y: 173 lines of code doctests/dt_json.py x: 2 commits (all time) y: 224 lines of code doctests/dt_stream.py x: 1 commits (all time) y: 164 lines of code redis/commands/search/field.py x: 10 commits (all time) y: 123 lines of code redis/commands/bf/__init__.py x: 9 commits (all time) y: 154 lines of code redis/commands/bf/info.py x: 5 commits (all time) y: 97 lines of code redis/commands/json/commands.py x: 23 commits (all time) y: 219 lines of code redis/commands/search/__init__.py x: 12 commits (all time) y: 128 lines of code redis/commands/search/suggestion.py x: 5 commits (all time) y: 35 lines of code redis/commands/json/__init__.py x: 14 commits (all time) y: 92 lines of code redis/commands/timeseries/__init__.py x: 8 commits (all time) y: 72 lines of code redis/_parsers/socket.py x: 1 commits (all time) y: 110 lines of code redis/asyncio/__init__.py x: 5 commits (all time) y: 63 lines of code redis/commands/__init__.py x: 9 commits (all time) y: 17 lines of code redis/commands/search/document.py x: 4 commits (all time) y: 11 lines of code redis/commands/search/querystring.py x: 5 commits (all time) y: 145 lines of code redis/asyncio/retry.py x: 4 commits (all time) y: 40 lines of code redis/commands/sentinel.py x: 4 commits (all time) y: 31 lines of code benchmarks/base.py x: 7 commits (all time) y: 34 lines of code
3073.0
lines of code
  min: 1.0
  average: 179.66
  25th percentile: 28.0
  median: 65.0
  75th percentile: 173.0
  max: 3073.0
0 848.0
commits (all time)
min: 1.0 | average: 21.08 | 25th percentile: 1.0 | median: 3.0 | 75th percentile: 10.0 | max: 848.0

File Size vs. Contributors (all time): 119 points

redis/_parsers/resp3.py x: 6 contributors (all time) y: 206 lines of code doctests/dt_vec_set.py x: 1 contributors (all time) y: 127 lines of code redis/commands/redismodules.py x: 6 contributors (all time) y: 43 lines of code redis/commands/vectorset/__init__.py x: 1 contributors (all time) y: 36 lines of code redis/commands/vectorset/commands.py x: 1 contributors (all time) y: 183 lines of code redis/commands/vectorset/utils.py x: 1 contributors (all time) y: 52 lines of code redis/asyncio/sentinel.py x: 10 contributors (all time) y: 247 lines of code redis/sentinel.py x: 24 contributors (all time) y: 269 lines of code redis/commands/core.py x: 48 contributors (all time) y: 3073 lines of code redis/asyncio/connection.py x: 33 contributors (all time) y: 969 lines of code redis/connection.py x: 108 contributors (all time) y: 1212 lines of code redis/asyncio/client.py x: 30 contributors (all time) y: 1035 lines of code redis/asyncio/cluster.py x: 25 contributors (all time) y: 1101 lines of code redis/client.py x: 201 contributors (all time) y: 1047 lines of code redis/cluster.py x: 39 contributors (all time) y: 1678 lines of code redis/utils.py x: 24 contributors (all time) y: 202 lines of code redis/backoff.py x: 6 contributors (all time) y: 57 lines of code redis/commands/search/commands.py x: 18 contributors (all time) y: 580 lines of code redis/commands/cluster.py x: 12 contributors (all time) y: 423 lines of code doctests/geo_index.py x: 1 contributors (all time) y: 103 lines of code redis/commands/helpers.py x: 10 contributors (all time) y: 76 lines of code tasks.py x: 10 contributors (all time) y: 67 lines of code redis/asyncio/lock.py x: 8 contributors (all time) y: 163 lines of code redis/exceptions.py x: 22 contributors (all time) y: 76 lines of code redis/lock.py x: 21 contributors (all time) y: 173 lines of code benchmarks/basic_operations.py x: 7 contributors (all time) y: 148 lines of code benchmarks/command_packer_benchmark.py x: 6 contributors (all time) y: 88 lines of code benchmarks/socket_read_size.py x: 4 contributors (all time) y: 19 lines of code redis/_parsers/base.py x: 5 contributors (all time) y: 186 lines of code redis/asyncio/utils.py x: 2 contributors (all time) y: 14 lines of code redis/auth/token.py x: 2 contributors (all time) y: 95 lines of code redis/ocsp.py x: 5 contributors (all time) y: 215 lines of code redis/__init__.py x: 25 contributors (all time) y: 74 lines of code doctests/query_agg.py x: 2 contributors (all time) y: 58 lines of code doctests/query_combined.py x: 2 contributors (all time) y: 71 lines of code doctests/query_ft.py x: 2 contributors (all time) y: 40 lines of code doctests/search_quickstart.py x: 3 contributors (all time) y: 239 lines of code doctests/search_vss.py x: 3 contributors (all time) y: 170 lines of code redis/commands/search/query.py x: 8 contributors (all time) y: 217 lines of code redis/commands/search/profile_information.py x: 1 contributors (all time) y: 7 lines of code doctests/home_json.py x: 1 contributors (all time) y: 78 lines of code doctests/cmds_cnxmgmt.py x: 1 contributors (all time) y: 15 lines of code doctests/cmds_list.py x: 1 contributors (all time) y: 65 lines of code redis/commands/search/aggregation.py x: 7 contributors (all time) y: 170 lines of code redis/typing.py x: 11 contributors (all time) y: 45 lines of code redis/auth/token_manager.py x: 1 contributors (all time) y: 235 lines of code redis/credentials.py x: 2 contributors (all time) y: 33 lines of code redis/event.py x: 1 contributors (all time) y: 255 lines of code doctests/trans_pipe.py x: 1 contributors (all time) y: 44 lines of code redis/_parsers/helpers.py x: 8 contributors (all time) y: 676 lines of code doctests/dt_set.py x: 3 contributors (all time) y: 84 lines of code redis/cache.py x: 2 contributors (all time) y: 314 lines of code doctests/cmds_generic.py x: 1 contributors (all time) y: 90 lines of code redis/commands/timeseries/commands.py x: 6 contributors (all time) y: 483 lines of code redis/commands/search/_util.py x: 2 contributors (all time) y: 7 lines of code redis/commands/search/result.py x: 5 contributors (all time) y: 59 lines of code redis/_parsers/hiredis.py x: 4 contributors (all time) y: 173 lines of code doctests/dt_json.py x: 1 contributors (all time) y: 224 lines of code doctests/dt_stream.py x: 1 contributors (all time) y: 164 lines of code redis/commands/search/field.py x: 8 contributors (all time) y: 123 lines of code redis/commands/bf/__init__.py x: 5 contributors (all time) y: 154 lines of code redis/commands/bf/info.py x: 3 contributors (all time) y: 97 lines of code redis/commands/json/commands.py x: 11 contributors (all time) y: 219 lines of code redis/commands/timeseries/utils.py x: 3 contributors (all time) y: 30 lines of code redis/commands/search/__init__.py x: 5 contributors (all time) y: 128 lines of code redis/commands/timeseries/__init__.py x: 4 contributors (all time) y: 72 lines of code redis/_parsers/commands.py x: 2 contributors (all time) y: 170 lines of code redis/_parsers/socket.py x: 1 contributors (all time) y: 110 lines of code redis/asyncio/__init__.py x: 5 contributors (all time) y: 63 lines of code redis/commands/__init__.py x: 6 contributors (all time) y: 17 lines of code redis/commands/search/document.py x: 3 contributors (all time) y: 11 lines of code redis/commands/search/querystring.py x: 4 contributors (all time) y: 145 lines of code redis/asyncio/retry.py x: 3 contributors (all time) y: 40 lines of code redis/commands/sentinel.py x: 4 contributors (all time) y: 31 lines of code
3073.0
lines of code
  min: 1.0
  average: 179.66
  25th percentile: 28.0
  median: 65.0
  75th percentile: 173.0
  max: 3073.0
0 201.0
contributors (all time)
min: 1.0 | average: 8.02 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 6.0 | max: 201.0

File Size vs. Commits (30 days): 0 points

No data for "commits (30d)" vs. "lines of code".

File Size vs. Contributors (30 days): 0 points

No data for "contributors (30d)" vs. "lines of code".


File Size vs. Commits (90 days): 0 points

No data for "commits (90d)" vs. "lines of code".

File Size vs. Contributors (90 days): 0 points

No data for "contributors (90d)" vs. "lines of code".