The package list is obtained from https://hugovk.github.io/top-pypi-packages/
Source code of each of the packages in the list was parsed for exception handling statements and blocks.
Total count of classes
in all the exception handlers are accumulated into Total Exception Handlers
.
Total number of re-raises statements in the exception handlers are counted into Total Re-raises Statements
Total number of cases where exception handling is done for Exception
or BaseException
directly is in Total BaseException Handlers
Number | Package | Lines of Code | Total Exception Handlers | Total Re-raise Statements | Total BaseException Handlers |
---|---|---|---|---|---|
1 |
pip |
67677 |
727 |
160 (22%) |
49 (6%) |
2 |
urllib3 |
5242 |
121 |
33 (27%) |
5 (4%) |
3 |
botocore |
23774 |
247 |
70 (28%) |
8 (3%) |
4 |
six |
649 |
8 |
2 (25%) |
0 (0%) |
5 |
python-dateutil |
4295 |
55 |
6 (10%) |
3 (5%) |
6 |
s3transfer |
3294 |
34 |
2 (5%) |
12 (35%) |
7 |
pyyaml |
12241 |
26 |
9 (34%) |
1 (3%) |
8 |
docutils |
28442 |
178 |
39 (21%) |
2 (1%) |
9 |
pyasn1 |
5091 |
20 |
3 (15%) |
0 (0%) |
10 |
jmespath |
1316 |
14 |
2 (14%) |
0 (0%) |
11 |
requests |
2558 |
77 |
23 (29%) |
0 (0%) |
12 |
setuptools |
15892 |
229 |
42 (18%) |
26 (11%) |
13 |
awscli |
21402 |
144 |
52 (36%) |
25 (17%) |
14 |
futures |
1379 |
8 |
0 (0%) |
0 (0%) |
15 |
rsa |
1108 |
6 |
6 (100%) |
0 (0%) |
16 |
certifi |
11 |
0 |
0 (0%) |
0 (0%) |
17 |
colorama |
551 |
4 |
0 (0%) |
0 (0%) |
18 |
idna |
10524 |
4 |
2 (50%) |
0 (0%) |
19 |
wheel |
956 |
7 |
3 (42%) |
0 (0%) |
20 |
chardet |
4711 |
0 |
0 (0%) |
0 (0%) |
21 |
simplejson |
3211 |
42 |
8 (19%) |
2 (4%) |
22 |
boto3 |
3291 |
8 |
5 (62%) |
0 (0%) |
23 |
pytz |
1766 |
11 |
1 (9%) |
0 (0%) |
24 |
numpy |
109158 |
662 |
143 (21%) |
119 (17%) |
25 |
awscli-cwlogs |
2152 |
28 |
4 (14%) |
5 (17%) |
26 |
markupsafe |
822 |
10 |
3 (30%) |
0 (0%) |
27 |
cryptography |
41206 |
40 |
19 (47%) |
0 (0%) |
28 |
jinja2 |
7371 |
136 |
19 (13%) |
24 (17%) |
29 |
cffi |
24698 |
0 |
0 (0%) |
0 (0%) |
30 |
enum34 |
499 |
13 |
2 (15%) |
0 (0%) |
31 |
pycparser |
8440 |
52 |
2 (3%) |
5 (9%) |
32 |
ipaddress |
1191 |
36 |
6 (16%) |
0 (0%) |
33 |
protobuf |
43609 |
103 |
22 (21%) |
1 (0%) |
34 |
asn1crypto |
8861 |
43 |
19 (44%) |
0 (0%) |
35 |
click |
4255 |
95 |
8 (8%) |
26 (27%) |
36 |
pytest |
13560 |
190 |
19 (10%) |
31 (16%) |
37 |
future |
41038 |
78 |
3 (3%) |
8 (10%) |
38 |
pbr |
3922 |
42 |
4 (9%) |
10 (23%) |
39 |
attrs |
1690 |
8 |
0 (0%) |
1 (12%) |
40 |
decorator |
308 |
6 |
0 (0%) |
1 (16%) |
41 |
pyparsing |
3209 |
50 |
10 (20%) |
9 (18%) |
42 |
pandas |
233053 |
1119 |
182 (16%) |
150 (13%) |
43 |
werkzeug |
11418 |
222 |
19 (8%) |
22 (9%) |
44 |
pyasn1-modules |
6836 |
0 |
0 (0%) |
0 (0%) |
45 |
virtualenv |
1615 |
19 |
1 (5%) |
3 (15%) |
46 |
flask |
3230 |
42 |
10 (23%) |
5 (11%) |
47 |
psutil |
16533 |
288 |
54 (18%) |
10 (3%) |
48 |
boto |
51796 |
163 |
32 (19%) |
11 (6%) |
49 |
itsdangerous |
620 |
21 |
9 (42%) |
7 (33%) |
50 |
py |
5819 |
111 |
28 (25%) |
16 (14%) |
51 |
google-api-core |
1905 |
21 |
13 (61%) |
5 (23%) |
52 |
argparse |
1495 |
16 |
5 (31%) |
0 (0%) |
53 |
mock |
5643 |
38 |
1 (2%) |
1 (2%) |
54 |
pyopenssl |
2730 |
17 |
1 (5%) |
8 (47%) |
55 |
pluggy |
672 |
18 |
3 (16%) |
4 (22%) |
56 |
coverage |
13985 |
0 |
0 (0%) |
0 (0%) |
57 |
scipy |
159043 |
29 |
4 (13%) |
10 (34%) |
58 |
grpcio |
15138 |
2 |
0 (0%) |
0 (0%) |
59 |
google-cloud-core |
572 |
5 |
0 (0%) |
0 (0%) |
60 |
jsonschema |
2612 |
23 |
4 (17%) |
2 (8%) |
61 |
psycopg2 |
11299 |
13 |
0 (0%) |
0 (0%) |
62 |
pygments |
65147 |
88 |
16 (18%) |
7 (7%) |
63 |
scikit-learn |
114720 |
449 |
110 (24%) |
54 (12%) |
64 |
docopt |
505 |
2 |
0 (0%) |
0 (0%) |
65 |
funcsigs |
511 |
14 |
3 (21%) |
0 (0%) |
66 |
pillow |
30148 |
385 |
68 (17%) |
36 (9%) |
67 |
httplib2 |
7305 |
91 |
9 (9%) |
7 (7%) |
68 |
more-itertools |
2835 |
25 |
3 (12%) |
1 (4%) |
69 |
cachetools |
570 |
24 |
4 (16%) |
0 (0%) |
70 |
websocket-client |
2151 |
28 |
6 (21%) |
6 (21%) |
71 |
lxml |
24077 |
85 |
6 (7%) |
5 (5%) |
72 |
google-auth |
1873 |
38 |
1 (2%) |
0 (0%) |
73 |
oauth2client |
3451 |
57 |
7 (12%) |
2 (3%) |
74 |
google-api-python-client |
2202 |
36 |
4 (11%) |
8 (22%) |
75 |
paramiko |
10079 |
88 |
15 (17%) |
14 (15%) |
76 |
ptyprocess |
534 |
28 |
8 (28%) |
2 (7%) |
77 |
tornado |
26982 |
320 |
15 (4%) |
70 (21%) |
78 |
mccabe |
262 |
5 |
0 (0%) |
0 (0%) |
79 |
pexpect |
2055 |
22 |
3 (13%) |
1 (4%) |
80 |
sqlalchemy |
237601 |
364 |
58 (15%) |
63 (17%) |
81 |
pyjwt |
985 |
35 |
15 (42%) |
1 (2%) |
82 |
uritemplate |
290 |
1 |
0 (0%) |
0 (0%) |
83 |
matplotlib |
117843 |
521 |
114 (21%) |
36 (6%) |
84 |
wrapt |
914 |
12 |
2 (16%) |
0 (0%) |
85 |
bcrypt |
655 |
0 |
0 (0%) |
0 (0%) |
86 |
markdown |
3769 |
37 |
4 (10%) |
3 (8%) |
87 |
google-resumable-media |
692 |
1 |
0 (0%) |
0 (0%) |
88 |
elasticsearch |
3802 |
67 |
24 (35%) |
4 (5%) |
89 |
pymysql |
2977 |
22 |
1 (4%) |
4 (18%) |
90 |
oauthlib |
3818 |
47 |
2 (4%) |
3 (6%) |
91 |
pymemcache |
3001 |
36 |
6 (16%) |
20 (55%) |
92 |
pycodestyle |
1647 |
16 |
0 (0%) |
0 (0%) |
93 |
docker-pycreds |
129 |
1 |
0 (0%) |
0 (0%) |
94 |
docker |
6009 |
39 |
78 (200%) |
2 (5%) |
95 |
google-cloud-bigquery |
4429 |
9 |
21 (233%) |
1 (11%) |
96 |
ipython |
33207 |
40 |
4 (10%) |
5 (12%) |
97 |
pynacl |
5156 |
3 |
0 (0%) |
0 (0%) |
98 |
prompt-toolkit |
18879 |
105 |
5 (4%) |
12 (11%) |
99 |
multidict |
2187 |
18 |
7 (38%) |
2 (11%) |
100 |
absl-py |
4670 |
63 |
6 (9%) |
3 (4%) |