{"id":2789,"library":"stdlib-list","title":"Python Standard Library List","description":"A Python library that provides lists of all standard library modules for various Python versions (currently 2.7 through 3.14). It is actively maintained with updates for new Python releases. This library is particularly useful for static analysis and tooling that needs to differentiate between standard library and third-party modules. For Python 3.10 and newer, `sys.stdlib_module_names` offers similar functionality.","status":"active","version":"0.12.0","language":"en","source_language":"en","source_url":"https://github.com/pypi/stdlib-list","tags":["python","standard library","modules","utility","static analysis","introspection"],"install":[{"cmd":"pip install stdlib-list","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Runtime dependency for the library.","package":"python","version":">=3.9","optional":false}],"imports":[{"symbol":"stdlib_list","correct":"from stdlib_list import stdlib_list"}],"quickstart":{"code":"from stdlib_list import stdlib_list\n\n# Get a list of standard library modules for Python 3.9\nlibraries_3_9 = stdlib_list(\"3.9\")\nprint(f\"Python 3.9 stdlib modules (first 5): {libraries_3_9[:5]}\")\n\n# Get a list for the latest supported Python version (e.g., 3.14 in v0.12.0)\nlibraries_latest = stdlib_list(\"3.14\")\nprint(f\"Python 3.14 stdlib modules (first 5): {libraries_latest[:5]}\")\n\n# Check if a module is in the standard library for a specific version\nis_os_in_3_9 = \"os\" in libraries_3_9\nprint(f\"'os' in Python 3.9 stdlib: {is_os_in_3_9}\")","lang":"python","description":"This example demonstrates how to import `stdlib_list` and retrieve the list of standard library modules for a specific Python version, or for the latest version supported by the package."},"warnings":[{"fix":"Consider using `sys.stdlib_module_names` or `sys.builtin_module_names` for newer Python versions.","message":"For Python 3.10 and newer, Python's built-in `sys.stdlib_module_names` and `sys.builtin_module_names` provide similar functionality to identify standard library modules. This library might be redundant for such environments if only the currently running Python's stdlib list is needed.","severity":"gotcha","affected_versions":"Python >= 3.10"},{"fix":"Upgrade your Python environment to 3.9+ or pin `stdlib-list` to a version older than 0.11.0 (e.g., `stdlib-list==0.10.0`).","message":"Support for Python 3.7 and 3.8 was dropped starting from `stdlib-list` version 0.11.0. Users on these Python versions will need to use an older `stdlib-list` version.","severity":"breaking","affected_versions":"stdlib-list >= 0.11.0 on Python 3.7, 3.8"},{"fix":"Uninstall `types-stdlib-list` if your `stdlib-list` version is 0.9.0 or greater to avoid potential conflicts or redundant dependencies.","message":"The `types-stdlib-list` package is a separate type stub package that becomes unnecessary for `stdlib-list` versions 0.9.0 and newer, as type annotations are now included directly in the main library.","severity":"deprecated","affected_versions":"stdlib-list >= 0.9.0 (when `types-stdlib-list` is also installed)"},{"fix":"Ensure you are referencing the official `pypi/stdlib-list` GitHub repository and PyPI page for the most up-to-date information and project status.","message":"The `stdlib-list` project was originally archived by its creator after version 0.8.0. It was subsequently transferred to the `pypi` organization and is now actively maintained by new contributors. While the transition was managed to ensure continuity, it's a historical note if referencing very old documentation or issues.","severity":"gotcha","affected_versions":"All versions, particularly relevant for versions around and after 0.8.0."}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}