skillfed

requirements-detector

Python tool to find and list requirements of a Python project

requirements-detector v1.6.0 567.2K downloads/30d#5,971 on PyPI48
Permissive license MIT Active released

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-detector

uv

uv add requirements-detector

poetry

poetry add requirements-detector

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Quality Assurance

Tags

detect python project dependenciesparse requirements filesfind project dependencies automaticallyanalyze setup.py and pyproject.tomllist python package requirementsscan for project dependenciesrequirements file parser
dependency-analysisbuild-automation

More Quality Assurance packages