--- id: requirements-detector version: "1.6.0" license: MIT license_treatment: permissive maintenance: active --- # requirements-detector — Python tool to find and list requirements of a Python project License: permissive · Maintenance: active · Downloads: 567.2K/mo ## 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 above — 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 pip install requirements-detector uv add requirements-detector 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_current - Install friction: low - Maintenance: active - Downloads: 567.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags detect python project dependencies, parse requirements files, find project dependencies automatically, analyze setup.py and pyproject.toml, list python package requirements, scan for project dependencies, requirements file parser, dependency-analysis, build-automation [View on SkillFed](https://skillfed.io/packages/requirements-detector) · [View on PyPI](https://pypi.org/project/requirements-detector/)