目录结构
Requests-2.18.4的源码目录结构如下所示:
$ tree -d
.
├── _appveyor
├── docs
│ ├── community
│ ├── dev
│ ├── _static
│ ├── _templates
│ ├── _themes
│ └── user
├── ext
├── requests
└── tests
└── testserver
12 directories
其中核心部分无疑是requests目录了。
代码量统计
Requests-2.18.4的源码完整统计如下:
$ cloc .
81 text files.
81 unique files.
37 files ignored.
http://cloc.sourceforge.net v 1.60 T=0.16 s (275.1 files/s, 63601.8 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Python 34 1854 1897 5492
DOS Batch 1 34 2 227
make 2 34 7 202
PowerShell 1 31 5 193
HTML 3 44 7 136
Javascript 1 3 12 101
YAML 2 13 15 54
CSS 1 5 0 34
-------------------------------------------------------------------------------
SUM: 45 2018 1945 6439
------------------------------------------------------------------------------
而其中的requests目录的代码量统计如下:
$ cloc requests
18 text files.
18 unique files.
0 files ignored.
http://cloc.sourceforge.net v 1.60 T=0.05 s (342.1 files/s, 92205.3 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Python 18 1023 1371 2457
-------------------------------------------------------------------------------
SUM: 18 1023 1371 2457
-------------------------------------------------------------------------------
也就是说一共有18个文件,代码行数为2457行,简单看下该目录结构:
$ tree requests
requests
├── adapters.py
├── api.py
├── auth.py
├── certs.py
├── compat.py
├── cookies.py
├── exceptions.py
├── help.py
├── hooks.py
├── __init__.py
├── _internal_utils.py
├── models.py
├── packages.py
├── sessions.py
├── status_codes.py
├── structures.py
├── utils.py
└── __version__.py
0 directories, 18 files
没有子目录,一共18个文件在同一级子目录下。