stdlibs
List of packages in the stdlib
What it is and what it does
stdlibs is a reference package that maintains a static inventory of Python standard library modules across multiple CPython versions. It solves the problem of determining which modules are part of the standard library for a given Python version—useful for static analysis tools, linters, and import sorters that need to distinguish standard library imports from third-party ones.
The package provides module name lists for each major CPython release from 2.3 onward, plus combined views across all 2.x and 3.x releases. On Python 3.10+, the runtime provides `sys.stdlib_module_names`, but stdlibs exists to offer historical records, pre-release listings, and a broader set of importable modules that aren't always included in the official runtime list. It's used by tools like Ruff and µsort.
Use it for:
- Determine whether a module name belongs to the standard library for a specific Python version in static analysis.
- Track which stdlib modules were added or removed between Python versions for compatibility checking.
- Distinguish standard library imports from third-party packages in import sorting and linting tools.
- Generate diffs of stdlib module availability across Python versions for documentation or tooling.
- Support pre-3.10 Python versions where `sys.stdlib_module_names` is unavailable.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a static listing of all known modules in Python's standard library, with separate lists for each major CPython release dating back to Python 2.3.
Yes. This is a lightweight, actively maintained reference package with zero dependencies, permissive licensing, and clear utility for static analysis and tooling. Install it if you're building linters, import sorters, or any tool that needs to reliably distinguish standard library modules from third-party ones across multiple Python versions.
Install
stdlibs on PyPI
pip
pip install stdlibsuv
uv add stdlibspoetry
poetry add stdlibsInstalling stdlibs
Before you install
Low install friction with no runtime dependencies. Actively maintained; last release 169 days ago with repository activity as recent as 2026-07-01.
License in practice
Licensed under MIT (permissive), allowing use in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install stdlibs
from stdlibs import module_names
print("os" in module_names) # True
from stdlibs.py36 import module_names as py36_names
print("zoneinfo" in py36_names) # False
Requires Python 3.8 or newer.
Verify before relying
- Whether the package captures all private/importable modules that ship with stable CPython releases as claimed in the description.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 169 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,672,943/month — #2,948 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: stdlibs-2026.2.26-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
stdlib-listProvides lists of Python standard library…
permissive · top 5,000 on PyPI
astprettyPretty-print Python abstract syntax trees (AST)…
permissive · top 15,000 on PyPI
libProvides zero-dependency Python bindings to…
permissive · top 15,000 on PyPI
classify-importsParses, classifies, and sorts Python import…
permissive · top 15,000 on PyPI
sgmllib3kA Python 3 port of the deprecated stdlib…
permissive · top 5,000 on PyPI
typingProvides type hints and annotations for Python…
permissive · top 5,000 on PyPI
usortμsort sorts Python imports within detected…
permissive · top 5,000 on PyPI
tokenize-rtWraps Python's stdlib tokenize module to enable…
permissive · top 5,000 on PyPI
types-contextvarsProvides type stubs for Python's contextvars…
permissive · top 15,000 on PyPI
session-info2Captures and displays the versions of all…
copyleft · top 5,000 on PyPI