|
1 |
| -Python Standard Library List |
2 |
| -============================ |
| 1 | +# stdlib-list |
3 | 2 |
|
4 |
| -# This repo is now archived. I no longer have the spoons to maintain this in my spare time. |
| 3 | +This package includes lists of all of the standard libraries for Python 2.6, |
| 4 | +2.7, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, and 3.9 along with the code for |
| 5 | +scraping the official Python docs to get said lists. |
5 | 6 |
|
6 |
| -This package includes lists of all of the standard libraries for Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, and 3.9 along with the code for scraping the official Python docs to get said lists. |
| 7 | +## Installation |
7 | 8 |
|
8 |
| -Listing the modules in the standard library? Wait, why on Earth would you care about that?! |
9 |
| -------------------------------------------------------------------------------------------- |
| 9 | +`stdlib-list` is available on PyPI: |
10 | 10 |
|
11 |
| -Because knowing whether or not a module is part of the standard library will come in handy in [a project of mine](https://github.com/jackmaney/pypt). [And I'm not the only one](http://stackoverflow.com/questions/6463918/how-can-i-get-a-list-of-all-the-python-standard-library-modules) who would find this useful. Or, the TL;DR answer is that it's handy in situations when you're analyzing Python code and would like to find module dependencies. |
| 11 | +```bash |
| 12 | +python -m pip install stdlib-list |
| 13 | +``` |
12 | 14 |
|
13 |
| -After googling for a way to generate a list of Python standard libraries (and looking through the answers to the previously-linked Stack Overflow question), I decided that I didn't like the existing solutions. So, I started by writing a scraper for the TOC of the Python Module Index for each of the versions of Python above. |
| 15 | +## Usage |
14 | 16 |
|
15 |
| -However, web scraping can be a fragile affair. Thanks to [a suggestion](https://github.com/jackmaney/python-stdlib-list/issues/1#issuecomment-86517208) by [@ncoghlan](https://github.com/ncoghlan), and some further help from [@birkenfeld](https://github.com/birkenfeld) and [@epc](https://github.com/epc), the population of the lists is now done by grabbing and parsing the Sphinx object inventory for the official Python docs of each relevant version. |
| 17 | +```python |
| 18 | +>>> from stdlib_list import stdlib_list |
| 19 | +>>> libraries = stdlib_list("2.7") |
| 20 | +>>> libraries[:10] |
| 21 | +['AL', 'BaseHTTPServer', 'Bastion', 'CGIHTTPServer', 'ColorPicker', 'ConfigParser', 'Cookie', 'DEVICE', 'DocXMLRPCServer', 'EasyDialogs'] |
| 22 | +``` |
16 | 23 |
|
17 |
| -Usage |
18 |
| ------ |
| 24 | +For more details, check out [the docs](http://python-stdlib-list.readthedocs.org/en/latest/). |
19 | 25 |
|
20 |
| - >>> from stdlib_list import stdlib_list |
21 |
| - >>> libraries = stdlib_list("2.7") |
22 |
| - >>> libraries[:10] |
23 |
| - ['AL', 'BaseHTTPServer', 'Bastion', 'CGIHTTPServer', 'ColorPicker', 'ConfigParser', 'Cookie', 'DEVICE', 'DocXMLRPCServer', 'EasyDialogs'] |
| 26 | +## Credits and Project History |
24 | 27 |
|
25 |
| -For more details, check out [the docs](http://python-stdlib-list.readthedocs.org/en/latest/). |
| 28 | +This library was created by [@jackmaney](https://github.com/jackmaney), |
| 29 | +and was maintained with the help of [@ocefpaf](https://github.com/ocefpaf) and |
| 30 | +[@ericdill](https://github.com/ericdill) until |
| 31 | +[version 0.8.0](https://github.com/pypi/stdlib-list/releases/tag/v0.8.0), |
| 32 | +after which the primary maintainer |
| 33 | +[archived the project](https://github.com/pypi/stdlib-list/commit/7bc9a32789221b4e23edcb6a2c1466e8234aabbb). |
| 34 | + |
| 35 | +With the primary maintainer's approval, the project was transferred |
| 36 | +from `jackmaney/python-stdlib-list` to `pypi/stdlib-list`, and was adopted |
| 37 | +by new maintainers. |
26 | 38 |
|
| 39 | +The README immediately prior to the maintainership transfer is |
| 40 | +preserved at [`READMD.md.old`](./README.md.old). |
0 commit comments