stdlibs: Python Standard Library Module Listing

2026.2.26 · active · verified Fri Apr 10

The `stdlibs` Python package (also known as `stdlib-list` on GitHub) provides a static, programmatic listing of modules in the Python standard library. It offers lists for various Python major releases, dating back to Python 2.3, and combined lists for all 3.x or 2.x modules. This package is primarily used by tools for static analysis, linting, and other applications that need an authoritative, historical record of standard library module names. As of version 2026.2.26, it continues to track changes in the CPython standard library and appears to follow a date-based release cadence, indicating active maintenance.

Warnings

Install

Imports

Quickstart

Demonstrates how to import the `stdlibs` package and access its various lists of standard library module names for different Python versions. The primary attributes are `module_names` (a superset of 3.x modules) and `pyXX` for specific Python versions (e.g., `py310`).

import stdlibs

# Get a list of all module names ever available in Python 3.x
all_py3_modules = stdlibs.py3_all
print(f"Total Python 3.x modules recorded: {len(all_py3_modules)}")

# Get the list of modules for a specific Python version (e.g., Python 3.9)
py39_modules = stdlibs.py39
print(f"Python 3.9 modules: {py39_modules[:5]}...")

# Check if a module exists in a specific version
is_asyncio_in_py34 = 'asyncio' in stdlibs.py34
print(f"Is 'asyncio' in Python 3.4 stdlib? {is_asyncio_in_py34}")

view raw JSON →