stdlibs
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
If you intend to process more than one version, you may find the string api easier:
>>> from stdlibs import stdlib_module_names, KNOWN_VERSIONS
>>> [v for v in KNOWN_VERSIONS if "dataclasses" in stdlib_module_names(v)]
['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15']
>>>
>>> sorted(stdlib_module_names("3.7") - stdlib_module_names("3.6"))
['_abc', '_contextvars', '_py_abc', '_queue', '_uuid', '_xxtestfuzz', 'contextvars', 'dataclasses']
>>>
>>> from moreorless.click import unified_diff
>>> prev = None
>>> buf = []
>>> for v in KNOWN_VERSIONS:
... cur = ''.join([f"{name}\n" for name in sorted(stdlib_module_names(v))])
... if prev:
... buf.append(unified_diff(prev, cur, f"new-in-{v}"))
... prev = cur
>>> print(''.join(''.join(buf).splitlines(True)[:10]), end='')
--- a/new-in-2.4
+++ b/new-in-2.4
@@ -19,7 +19,6 @@
DocXMLRPCServer
ERRNO
EasyDialogs
-FCNTL
FILE
FL
FileDialog
Regenerating
If there might have been new release tarballs, first execute
stdlibs.fetch_releases which will update stdlibs/releases.toml.
Then execute stdlibs.fetch which will download all those release tarballs, and
create/update the appropriate stdlibs/py*.py files with the changes. A fresh
run takes about two minutes, but is much faster on subsequent runs.
$ make distclean virtualenv
$ source .venv/bin/activate
(.venv) $ python -m stdlibs.fetch_releases
(.venv) $ python -m stdlibs.fetch
License
stdlibs is copyright Amethyst Reese, and licensed under
the MIT license. I am providing code in this repository to you under an open
source license. This is my personal repository; the license you receive to
my code is from me and not from my employer. See the LICENSE file for details.
Release files for stdlibs 2026.9.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stdlibs-2026.9.3.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stdlibs-2026.9.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 79.0 kB
Release files / stdlibs-2026.9.3.tar.gz
| Download URL | stdlibs-2026.9.3.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0da5ac692879757df75fd944ebabfae11b2d6454a2643658699a1c0a1f4bb91a
|
|
BLAKE2b-256 checksum How to use checksums |
14c1a67e0b9391d129cbbbecfef5ca8c0271c19f58da55bd81a373e83c1cdfe4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / stdlibs-2026.9.3-py3-none-any.whl
| Download URL | stdlibs-2026.9.3-py3-none-any.whl |
|---|---|
| Size | 59.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e323d7bff3d361ef30ae01582d1fd14eb71570b7d00c3e8d25f1c77e4b642c2
|
|
BLAKE2b-256 checksum How to use checksums |
0321677bfa039e50c496ed96d29948f6140fa8af4c64396b31b63051bda4c3c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log