No description, website, or topics provided.
Switch branches/tags
Clone or download
carlio Merge pull request #15 from movermeyer/fix_badges
Switched broken badges to
Latest commit 4227233 Mar 10, 2018

Requirements Detector


Latest Version Build Status Health Coverage Status Documentation


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:

  1. Parse (if this is successful, the remaining steps are skipped)
  2. Parse requirements.txt or requirements.pip
  3. Parse all *.txt and *.pip files inside a folder called requirements
  4. Parse all files in the root folder matching *requirements*.txt or reqs.txt (so for example, pip_requirements.txt would match, as would requirements_common.txt)


detect-requirements [path]

If path is not specified, the current working directory will be used.


The output will be plaintext, and match that of a pip requirements file, for example:


Usage From Python

>>> import os
>>> from requirements_detector import find_requirements
>>> find_requirements(os.getcwd())
[DetectedRequirement:Django==1.5.2, DetectedRequirement:South>=0.8, ...]