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.
pip install stdlibsVerified import paths — ran on the pinned version, not inferred.
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`).
Consider using `sys.stdlib_module_names` directly for the current runtime if historical or cross-version data is not needed. Otherwise, continue using `stdlibs` for its comprehensive static listings.
When targeting newer Python versions, consult the relevant `stdlibs.pyXX` list to verify module availability. If a module has been removed, migrate to external alternatives or re-implement necessary functionality.
Use `import stdlibs` instead of `import stdlib-list`.
Access the list directly without parentheses, e.g., `my_list = stdlibs.py3`.
Call the function with parentheses to get the list, e.g., `for module_name in stdlibs.get_stdlib_list():`.
Provide the version in the correct format, such as `stdlibs.get_stdlib_list(version='3.9')` or `stdlibs.get_stdlib_list(version='3')`.
No dependency data recorded yet.