pip-validate
Installation
pip install pip-validate
Usage
pip-validate --file pip_validate.py --req requirements.txt
You can either use --file
to check a single file or --dir
to check a module.
How does it work
Python files are parsed for import and import from statements. (other ways to import modules, e.g. using __import__()
are not considered).
Found external imports and entries in your requirements.txt
file will be matched. If PyPI name and module name differ, e.g. delegator.py
and delegator
, pip-search
is used to resolve aliases.
Namespace modules are currently not resolved.