requirements-detector
Python tool to find and list requirements of a Python project
What it is and what it does
requirements-detector is a command-line tool and Python library that automatically discovers what packages a Python project depends on. It searches for dependencies in standard locations—setup.py, pyproject.toml, requirements.txt, and other conventional files—then outputs them in pip-compatible format. You can run it from the command line to get a quick inventory of a project's dependencies, or import it into your own code to programmatically extract requirements.
The tool uses a fallback strategy: it checks setup.py first, then pyproject.toml (if Poetry is configured), then requirements files in the root and in a requirements/ subdirectory. This makes it useful for auditing unfamiliar projects, automating dependency documentation, or integrating dependency detection into build pipelines. It depends on astroid, packaging, semver, and tomli to parse various configuration formats.
Use it for:
- Audit an unfamiliar Python project to quickly see what external packages it requires.
- Automate dependency extraction for documentation or dependency tracking in CI/CD pipelines.
- Programmatically check a project's dependencies from within another Python tool or script.
- Identify dependencies across multiple requirements files in a project with non-standard layout.
- Generate a standardized requirements list from mixed configuration formats (setup.py, pyproject.toml, etc.).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Scans a Python project to detect and list its dependencies by parsing setup.py, pyproject.toml, requirements.txt, and other standard configuration files, outputting results in pip-compatible format.
Yes. The package is actively maintained, has no known vulnerabilities, uses permissive MIT licensing, and solves a concrete problem with low install friction. It is well-suited for anyone needing to programmatically or manually discover a Python project's dependencies.
Install
requirements-detector on PyPI
pip
pip install requirements-detectoruv
uv add requirements-detectorpoetry
poetry add requirements-detectorInstalling requirements-detector
Before you install
Low install friction with four lightweight runtime dependencies (astroid, packaging, semver, tomli). Package is actively maintained with a recent release and has been stable since its early releases.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install requirements-detector
from requirements_detector import find_requirements
import os
reqs = find_requirements(os.getcwd())
Requires Python 3.10 or later (supports up to Python 3.14).
Verify before relying
- Whether the tool correctly handles all modern dependency specification formats (e.g., PEP 508, extras syntax).
- Performance characteristics when scanning large projects with many requirements files.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — astroid, packaging, semver, tomli |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 567,178/month — #5,971 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: requirements_detector-1.6.0-py3-none-any.whl
Keywords: python, requirements detector
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
dparseParses Python dependency files…
permissive · top 5,000 on PyPI
depgatherExtracts and lists dependencies from multiple…
permissive · top 15,000 on PyPI
pip-check-reqsAudits Python project imports against…
permissive · top 15,000 on PyPI
dparse2Parses Python dependency manifests…
permissive · top 15,000 on PyPI
hatch-requirements-txtA Hatchling plugin that reads project…
permissive · top 5,000 on PyPI
hashinAutomates the process of adding cryptographic…
permissive · top 15,000 on PyPI
pip-toolspip-tools provides command-line tools to…
permissive · top 5,000 on PyPI
pip-upgraderAn interactive CLI tool that upgrades Python…
permissive · top 15,000 on PyPI
pip-requirements-parserParses pip requirements files with the same…
permissive · top 1,000 on PyPI
licensecheckScans a project's dependencies to extract their…
permissive · top 15,000 on PyPI