importlib_metadata
importlib_metadata is a library to access the metadata for a Python package. It is intended to be ported to Python 3.8.
Usage
importlib_metadata, unlike its sister packages importlib and importlib.resources, operates on Python Distribution packages (the package as installed by pip or similar).
This module exposes a few functions:
metadata takes a distribution package name and returns the metadata for that package (as email.Message).
version takes a distribution package name and returns the version for that package.
entry_points takes a distribution package name and returns a structure of entry points declared by that package.
resolve accepts an entry point as returned by entry_points and resolves it to the module or callable that it references.
read_text takes the distribution package name and a filename in that package’s info directory and return the text of that file.
Support for Custom Package Installers
importlib_metadata provides hooks for third-party package installers through their declared finders. A custom installer, if it provides its own finder for installed packages, should also provide on that finder a find_distribution callable that when called with the name of a package will return a Distribution instance capable of loading the metadata for that named package (or None if that finder has no knowledge of that package or its metadata).
Caveats
This project primarily supports third-party packages installed by PyPA tools (or other conforming packages). It does not support:
Packages in the stdlib.
Packages installed without metadata.
Packages installed as eggs.
Eggs
Not only does importlib_metadata not support loading metadata from eggs, it will crash when it attempts to load metadata for any package that’s an egg.
easy_install creates eggs when installing packages, which is why you should use pip to install packages. pip never installs eggs. There are some cases, however, where a project’s usage may not be able to avoid easy_install. In particular, if a project uses setup.py test, any install_requires of that project that aren’t already installed will be installed using easy_install. Additionally, any project defining setup_requires may get those dependencies installed as eggs if those dependencies aren’t met before setup.py is invoked (for any command).
Because importlib_metadata doesn’t support loading metadata from eggs and because importlib_metadata calls itself to get its own version, simply importing importlib_metadata will fail if it is installed as an egg. Any package that incorporates importlib_metadata (directly or indirectly) should be prepared to guide its users to tools that avoid installing eggs (such as pip and tox).
More detail and discussion can be found at issue 19.
Project details
Project home: https://gitlab.com/python-devs/importlib_metadata
Report bugs at: https://gitlab.com/python-devs/importlib_metadata/issues
Code hosting: https://gitlab.com/python-devs/importlib_metadata.git
Documentation: http://importlib_metadata.readthedocs.io/
Metadata
Release files for importlib-metadata 0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| importlib_metadata-0.7.tar.gz | 16.7 kB | Without provenance | Details for importlib_metadata-0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| importlib_metadata-0.7-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for importlib_metadata-0.7-py2.py3-none-any.whl |
Total release size: 33.7 kB
Release files / importlib_metadata-0.7.tar.gz
| Download URL | importlib_metadata-0.7.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28fba9f65e5415a691dd254cdb602bcc4d6f738e68407ad251651db358b63bcf
|
|
BLAKE2b-256 checksum How to use checksums |
637824cf79040fdd5d9c9cfd060317846c6b71c2ba8c5f98ab17a306aa168f81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2
|
Release files / importlib_metadata-0.7-py2.py3-none-any.whl
| Download URL | importlib_metadata-0.7-py2.py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4a545e6125dc72b4ad98201ea3f40f92e8126e3a19667352b3a134d22b8bc74f
|
|
BLAKE2b-256 checksum How to use checksums |
d3509c436e4ac464f16e271e34e6c79b9c753e7e1a80b0ebd86da9b99de182ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2
|
Security for importlib-metadata 0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.