Python tool to find and list requirements of a Python project
Maintained. Last release 4 months ago, commits in 5 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install requirements-detectorRequirements Detector
Status
About
requirements-detector is a simple Python tool which attempts to find and list the requirements of a Python project.
When run from the root of a Python project, it will try to ascertain which libraries and the versions of those libraries that the project depends on.
It uses the following methods in order, in the root of the project:
- Parse
setup.py(if this is successful, the remaining steps are skipped) - Parse
pyproject.toml(if atool.poetry.dependenciessection is found, the remaining steps are skipped) - Parse
requirements.txtorrequirements.pip - Parse all
*.txtand*.pipfiles inside a folder calledrequirements - Parse all files in the root folder matching
*requirements*.txtorreqs.txt(so for example,pip_requirements.txtwould match, as wouldrequirements_common.txt)
Usage
detect-requirements [path]
If path is not specified, the current working directory will be used.
Output
The output will be plaintext, and match that of a pip requirements file, for example: