importlib_metadata
A backport and reference implementation of Python's importlib.metadata for reading package metadata
Repository Health
Technical Analysis
importlib_metadata gives Python code a consistent API for reading a package’s metadata — version, entry points, dependencies, top-level modules — without importing that package. It is both the reference implementation used to develop new features for the standard library’s importlib.metadata module and a standalone backport, so projects supporting older Python versions (or wanting the latest metadata-reading features before they land upstream) can pip install it directly.
Because so much of Python’s packaging ecosystem (entry-point discovery, plugin systems, pip show-style introspection) depends on reading installed-package metadata, this library sits quietly underneath a large share of the tooling ecosystem, including being vendored into setuptools and used by countless plugin-loading frameworks.
What You Get
version(),metadata(), anddistribution()APIs for reading installed package metadata- Entry-point discovery (
entry_points()) used to power plugin systems across the ecosystem - Support for reading dependencies/requirements declared by a distribution
- A backport that tracks and previews new features before they land in the standard library
- Compatibility across older supported Python versions that lack the newest stdlib features
Common Use Cases
- Building plugin systems that discover installed plugins via entry points
- Introspecting a package’s version or metadata at runtime without importing it
- Backporting the newest
importlib.metadatacapabilities to projects on older Python versions - Powering package-management tooling that needs to enumerate installed distributions
Under The Hood
Architecture - importlib_metadata/__init__.py implements Distribution/PackagePath abstractions with pluggable finders that locate installed package metadata (.dist-info/.egg-info) on sys.path, backed by helper modules for adapting raw email-style metadata (_adapters.py), text parsing (_text.py), and collection utilities (_collections.py, _itertools.py, _functools.py) kept intentionally dependency-free for early-bootstrap use. Tech Stack - Pure Python with minimal dependencies (zipp for zip-file path support pre-3.12), packaged with modern PEP 621 pyproject.toml metadata, tested via tox/pytest across supported CPython versions, and typed-checked with mypy. Code Quality - A large tests/ suite (test_api.py, test_integration.py, test_zip.py, test_main.py) plus fixture helpers reflects the project’s role as a reference implementation feeding directly into CPython, where correctness bugs would break the standard library itself. API Design - The API mirrors what later becomes stdlib importlib.metadata, so the learning curve is minimal for anyone who has used the standard library version; version('pkgname') and entry_points(group=...) cover the vast majority of real usage in one call.
Used by 4 apps in this directory
Apache Airflow
Data Engineering
Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.
MLflow
AI Development · Monitoring
The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.
SWIRL
Search · Databases · Data Engineering
Federated AI search and RAG across 100+ enterprise sources—no data extraction, no vector database required.
Traefik
Devops · Automation · Security
A cloud-native reverse proxy and load balancer that auto-configures itself from Docker, Kubernetes, and other orchestrators — zero manual routing required.