stdlibs


Namestdlibs JSON
Version 2024.10.25 PyPI version JSON
download
home_pageNone
SummaryList of packages in the stdlib
upload_time2024-10-26 05:55:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stdlibs

Simple list of top-level packages in Python's stdlib

[![license](https://img.shields.io/pypi/l/stdlibs.svg)](https://github.com/omnilib/stdlibs/blob/master/LICENSE)
[![version](https://img.shields.io/pypi/v/stdlibs.svg)](https://pypi.org/project/stdlibs)
[![changelog](https://img.shields.io/badge/change-log-blue)](https://stdlibs.omnilib.dev/en/latest/changelog.html)
[![documentation](https://readthedocs.org/projects/stdlibs/badge/?version=latest)](https://stdlibs.omnilib.dev)

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 for use with static analysis and other tooling.

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.


Install
-------

You can install it from PyPI:

```shell-session
$ 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`.

```pycon
>>> from stdlibs import module_names
>>> print("os" in module_names)
True
>>> print("peg_parser" in module_names)  # 3.9+
True

```

If you need a specific version, those are available as other modules:

```pycon
>>> from stdlibs.py36 import module_names as module_names_py36
>>> print("os" in module_names_py36)
True
>>> print("peg_parser" in module_names_py36)
False

```

If you intend to process more than one version, you may find the string api
easier:

```pycon
>>> 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']
>>>
>>> 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.

```shell-session
$ make distclean virtualenv
$ source .venv/bin/activate
(.venv) $ python -m stdlibs.fetch_releases
(.venv) $ python -m stdlibs.fetch
```


License
-------

stdlibs is copyright [Amethyst Reese](https://noswap.com), 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.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "stdlibs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Amethyst Reese <amy@n7.gg>",
    "download_url": "https://files.pythonhosted.org/packages/8c/1c/f58e322899227152be79af77814bca90e2a035f02452c38c7d1fbd085270/stdlibs-2024.10.25.tar.gz",
    "platform": null,
    "description": "# stdlibs\n\nSimple list of top-level packages in Python's stdlib\n\n[![license](https://img.shields.io/pypi/l/stdlibs.svg)](https://github.com/omnilib/stdlibs/blob/master/LICENSE)\n[![version](https://img.shields.io/pypi/v/stdlibs.svg)](https://pypi.org/project/stdlibs)\n[![changelog](https://img.shields.io/badge/change-log-blue)](https://stdlibs.omnilib.dev/en/latest/changelog.html)\n[![documentation](https://readthedocs.org/projects/stdlibs/badge/?version=latest)](https://stdlibs.omnilib.dev)\n\nThis package provides a static listing of all known modules in the Python standard\nlibrary, with separate lists available for each major release dating back to Python 2.3.\nIt also includes combined lists of all module names that were ever available in any\n3.x release, any 2.x release, or both.\n\nNote: On Python versions 3.10 or newer, a list of module names for the active runtime\nis available `sys.stdlib_module_names`. This package exists to provide an historical\nrecord for use with static analysis and other tooling.\n\nThis package only includes listings for CPython releases. If other runtimes would be\nuseful, open an issue\u00a0and start a discussion on how best that can be accomodated.\n\n\nInstall\n-------\n\nYou can install it from PyPI:\n\n```shell-session\n$ pip install stdlibs\n```\n\n\nUsage\n-----\n\nThe recommended usage is to reference `stdlibs.module_names` \u2014 the top-level\nnames that are valid in some version of Python 3.x on some platform.  This is a\nsuperset of top-level names you may have, and a superset of those in\n`sys.stdlib_module_names`.\n\n```pycon\n>>> from stdlibs import module_names\n>>> print(\"os\" in module_names)\nTrue\n>>> print(\"peg_parser\" in module_names)  # 3.9+\nTrue\n\n```\n\nIf you need a specific version, those are available as other modules:\n\n```pycon\n>>> from stdlibs.py36 import module_names as module_names_py36\n>>> print(\"os\" in module_names_py36)\nTrue\n>>> print(\"peg_parser\" in module_names_py36)\nFalse\n\n```\n\nIf you intend to process more than one version, you may find the string api\neasier:\n\n```pycon\n>>> from stdlibs import stdlib_module_names, KNOWN_VERSIONS\n>>> [v for v in KNOWN_VERSIONS if \"dataclasses\" in stdlib_module_names(v)]\n['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']\n>>>\n>>> sorted(stdlib_module_names(\"3.7\") - stdlib_module_names(\"3.6\"))\n['_abc', '_contextvars', '_py_abc', '_queue', '_uuid', '_xxtestfuzz', 'contextvars', 'dataclasses']\n>>>\n>>> from moreorless.click import unified_diff\n>>> prev = None\n>>> buf = []\n>>> for v in KNOWN_VERSIONS:\n...     cur = ''.join([f\"{name}\\n\" for name in sorted(stdlib_module_names(v))])\n...     if prev:\n...         buf.append(unified_diff(prev, cur, f\"new-in-{v}\"))\n...     prev = cur\n>>> print(''.join(''.join(buf).splitlines(True)[:10]), end='')\n--- a/new-in-2.4\n+++ b/new-in-2.4\n@@ -19,7 +19,6 @@\n DocXMLRPCServer\n ERRNO\n EasyDialogs\n-FCNTL\n FILE\n FL\n FileDialog\n\n```\n\nRegenerating\n------------\n\nIf there might have been new release tarballs, first execute\n`stdlibs.fetch_releases` which will update `stdlibs/releases.toml`.\n\nThen execute `stdlibs.fetch` which will download all those release tarballs, and\ncreate/update the appropriate `stdlibs/py*.py` files with the changes.  A fresh\nrun takes about two minutes, but is much faster on subsequent runs.\n\n```shell-session\n$ make distclean virtualenv\n$ source .venv/bin/activate\n(.venv) $ python -m stdlibs.fetch_releases\n(.venv) $ python -m stdlibs.fetch\n```\n\n\nLicense\n-------\n\nstdlibs is copyright [Amethyst Reese](https://noswap.com), and licensed under\nthe MIT license.  I am providing code in this repository to you under an open\nsource license.  This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "List of packages in the stdlib",
    "version": "2024.10.25",
    "project_urls": {
        "Documentation": "https://stdlibs.omnilib.dev/en/latest/",
        "Github": "https://github.com/omnilib/stdlibs",
        "Homepage": "https://stdlibs.omnilib.dev"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b3d39acd45204f5db4a6686582116ed4ad2313f33a64ebb2781761a415c233f",
                "md5": "68637f90bea0d9db18d05ebc396b6ffb",
                "sha256": "ecc56c68f3912bf82b284d7b68db71d77181c20557adfc99a53375e7f1f6c435"
            },
            "downloads": -1,
            "filename": "stdlibs-2024.10.25-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "68637f90bea0d9db18d05ebc396b6ffb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 56981,
            "upload_time": "2024-10-26T05:55:32",
            "upload_time_iso_8601": "2024-10-26T05:55:32.472446Z",
            "url": "https://files.pythonhosted.org/packages/8b/3d/39acd45204f5db4a6686582116ed4ad2313f33a64ebb2781761a415c233f/stdlibs-2024.10.25-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c1cf58e322899227152be79af77814bca90e2a035f02452c38c7d1fbd085270",
                "md5": "63710febdc4aea834a4e3bcb5abd727e",
                "sha256": "89b1c5778c3e3f3646d93e4777144c955929322fe78e0e3f24f6b5df387c76f6"
            },
            "downloads": -1,
            "filename": "stdlibs-2024.10.25.tar.gz",
            "has_sig": false,
            "md5_digest": "63710febdc4aea834a4e3bcb5abd727e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 19306,
            "upload_time": "2024-10-26T05:55:33",
            "upload_time_iso_8601": "2024-10-26T05:55:33.908550Z",
            "url": "https://files.pythonhosted.org/packages/8c/1c/f58e322899227152be79af77814bca90e2a035f02452c38c7d1fbd085270/stdlibs-2024.10.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-26 05:55:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "omnilib",
    "github_project": "stdlibs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "stdlibs"
}
        
Elapsed time: 0.45481s