A library to retrieve the software license list of Python packages installed with pip. Provides programmatic access to license metadata, with support for PEP 639, PEP 770, and SBOM files. Current version 1.1.0, requires Python >=3.10, released approximately every few months.
pip install pip-licenses-libVerified import paths — ran on the pinned version, not inferred.
Retrieve license info for all installed packages and print first 5 (name, license expression, version).
Upgrade to >=0.3.0 and use object attributes (e.g., pkg.name, pkg.version) instead of dictionary subscripting.
Use from pip_licenses_lib.models import Package.
Upgrade Python to >=3.10 for latest version.
No dependency data recorded yet.