Skip to main content

List of packages in the stdlib

Project description

stdlibs

Simple list of top-level packages in Python's standard library

license version changelog documentation

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stdlibs-2026.2.26.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stdlibs-2026.2.26-py3-none-any.whl (59.3 kB view details)

Uploaded Python 3

File details

Details for the file stdlibs-2026.2.26.tar.gz.

File metadata

  • Download URL: stdlibs-2026.2.26.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stdlibs-2026.2.26.tar.gz
Algorithm Hash digest
SHA256 10f911bdd8d3e45b452cc187b3527e6f9d288c8a943c5f973da94c71b2757d5b
MD5 68fc126da57938df76f757220b5677dc
BLAKE2b-256 d5cd2710eaacaefc8be2f520b55c313498a50a295a8378e932c70d4ea34250aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for stdlibs-2026.2.26.tar.gz:

Publisher: ci.yml on omnilib/stdlibs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stdlibs-2026.2.26-py3-none-any.whl.

File metadata

  • Download URL: stdlibs-2026.2.26-py3-none-any.whl
  • Upload date:
  • Size: 59.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stdlibs-2026.2.26-py3-none-any.whl
Algorithm Hash digest
SHA256 3257486216eac5ac627a3a4c5665802aca72fe7fc9e4ab1f232b1fb47bfd3db6
MD5 87b2e42e4f46d6a24df218a5e63f126e
BLAKE2b-256 90ecb6a5a568d584659e037c8f53fc25acc79950ac32796b8861b2015446b7b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for stdlibs-2026.2.26-py3-none-any.whl:

Publisher: ci.yml on omnilib/stdlibs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page