Skip to main content

Find packages that should be in requirements for a project

Project description

Find packages that should be in requirements for a project.

Assuming your project follows a layout like the suggested sample project:

setup.py
setup.cfg
requirements.txt
sample/__init__.py
sample/sample.py
sample/tests/test_sample.py

Basic usage, running in your project directory:

<activate virtualenv for your project>
pip-missing-reqs --ignore-files=sample/tests sample

This will find all imports in the code in “sample” and check that the packages those modules belong to are in the requirements.txt file.

Sample tox.ini configuration

To make your life easier, copy something like this into your tox.ini:

[pip-missing-reqs]
deps=-rrequirements.txt
commands=pip-missing-reqs --ignore-files=sample/tests sample

Excluding test files (or others) from this check

Your test files will sometimes be present in the same directory as your application source (“sample” in the above examples). The requirements for those tests generally should not be in the requirements.txt file, and you don’t want this tool to generate false hits for those.

You may exclude those test files from your check using the –ignore-files option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pip_missing_reqs-1.0.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

pip_missing_reqs-1.0.0-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pip_missing_reqs-1.0.0.tar.gz.

File metadata

File hashes

Hashes for pip_missing_reqs-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b9376e71cdbd763cf9eb3fe6c9b4d6726ebdbaa16530d40f7b91c7cdac545f4f
MD5 3af659ab4e15dcb41ec564b2d6d7d7b4
BLAKE2b-256 13e26e5c525ad966fcf83800856e38859009e2d841c00270a5bd7d29ddd31e3f

See more details on using hashes here.

File details

Details for the file pip_missing_reqs-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pip_missing_reqs-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1e769575bb3817c25896683be1b84c3e8728e8fa3ccfcd08dc0cb30605eec5df
MD5 2474df942df2b7c9be425f751261d3fb
BLAKE2b-256 121e28c8214b46f1a2a3b01b2884d503bb2592c2cbf4a17e986866f55cb10dc0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page