List of packages in the stdlib
Maintained. Last release 3 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install stdlibsstdlibs
Simple list of top-level packages in Python's standard library
This package provides a static listing of all known modules in the Python standard library, with separate lists available for each major release dating back to Python 2.3. It also includes combined lists of all module names that were ever available in any 3.x release, any 2.x release, or both.
Note: On Python versions 3.10 or newer, a list of module names for the active runtime
is available sys.stdlib_module_names. This package exists to provide an historical
record, including pre-release listings, for use with static analysis and other tooling.
It also captures a number of "private", importable modules that ship with stable
releases, but that aren't generally included in the official stdlib_module_names.
This package only includes listings for CPython releases. If other runtimes would be useful, open an issue and start a discussion on how best that can be accomodated.
stdlibs is used by:
Install
You can install it from PyPI:
$ pip install stdlibs
Usage
The recommended usage is to reference stdlibs.module_names — the top-level
names that are valid in some version of Python 3.x on some platform. This is a
superset of top-level names you may have, and a superset of those in
sys.stdlib_module_names.
>>> from stdlibs import module_names
>>> print("os" in module_names)
True
>>> print("zoneinfo" in module_names) # 3.9+
True
If you need a specific version, those are available as other modules:
>>> from stdlibs.py36 import module_names as module_names_py36
>>> print("os" in module_names_py36)
True
>>> print("zoneinfo" in module_names_py36)
False