A list of Python Standard Libraries (2.6-7, 3.2-4).
Project description
This package includes lists of all of the standard libraries for Python 2.6, 2.7, 3.2, 3.3, and 3.4, along with the code for scraping the official Python docs to get said lists.
Listing the modules in the standard library? Wait, why on Earth would you care about that?!
Because knowing whether or not a module is part of the standard library will come in handy in a project of mine. And I’m not the only one 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.
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.
However, web scraping can be a fragile affair. Thanks to a suggestion by @ncoghlan, and some further help from @birkenfeld and @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.
Usage
>>> from stdlib_list import stdlib_list >>> libraries = stdlib_list("2.7") >>> libraries[:10] ['AL', 'BaseHTTPServer', 'Bastion', 'CGIHTTPServer', 'ColorPicker', 'ConfigParser', 'Cookie', 'DEVICE', 'DocXMLRPCServer', 'EasyDialogs']
For more details, check out the docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file stdlib-list-0.3.0.tar.gz
.
File metadata
- Download URL: stdlib-list-0.3.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9a0d25d82fef05214c9c09ad71a810d091cf6bbb6209bc0f233bddc9dc05b8e |
|
MD5 | 852c01701de1c54ffcfffd764f8cc5f7 |
|
BLAKE2b-256 | f1ab353fa7d21f182ab981b93ea04cd27d70d63073eac0eda2d2b330ecbd3633 |