LicenseCheck
LicenseCheck is a Python utility that audits the licenses of your project's dependencies and verifies their compatibility with your project's license. It provides a command-line interface to quickly scan and report on package licenses. The library is actively maintained with frequent releases, typically several times a year.
Warnings
- breaking The codebase underwent significant refactoring in early 2025 (version 2025.x.x), which may lead to less stability or reliability compared to typical releases and could introduce API changes for direct library users.
- deprecated The 'native resolver' for parsing dependencies was deprecated in version 2024.3, with a recommendation to use 'uv' for improved performance and reliability.
- gotcha Critical `TypeError` and issues with `importlib.metadata.PackageMetadata.json` not existing in Python < 3.10 were fixed in versions 2024.1.4 and 2024.1.5. This indicates potential instability or incorrect behavior when running on Python 3.9, despite `requires_python: >=3.9`.
- gotcha The command-line interface (CLI) was updated in version 2025.0.1 to remove 'confusing functionality'. This implies that CLI arguments or behaviors might have changed or been streamlined, potentially affecting scripts or muscle memory built on older versions.
- gotcha Configuration files are parsed in a specific order: `pyproject.toml`, `setup.cfg`, `licensecheck.toml`, `licensecheck.json`, `licensecheck.ini`, followed by user-level config files. Configuration defined in earlier files takes precedence, which can lead to unexpected behavior if multiple config files exist with conflicting settings.
Install
-
pip install licensecheck
Imports
- licensecheck (CLI)
licensecheck
Quickstart
pip install licensecheck licensecheck