Skip to main content

Find extraneous pip packages not listed in your requirements.txt or as a sub-dependency.

Project description

extraneous

Find extraneous pip packages not listed in your requirements.txt or as a sub-dependency.

extraneous logo

PYPI

main

Tests Coverage

Tests Coverage

Tests Coverage

Tests Coverage

Flake8

Install

$ pip install extraneous

Help

$ extraneous.py -h
usage: extraneous.py [-h] [--verbose] [--include paths] [--exclude names]
[--full]

Identifies packages that are installed but not defined in requirements files.
Prints the 'pip uninstall' command that removes these extraneous packages and
any non-common dependencies. Looks for packages matching '*requirements*.txt'
in the current working directory.

optional arguments:
-h, --help
    show this help message and exit
--verbose, -v
    Prints installed site-package folders and requirements files.
--include paths, -i paths
    Additional directories to look for '*requirements*.txt' files in.
--exclude names, -e names
    Package names to not consider extraneous. ['extraneous', 'pipdeptree',
     'pip', 'setuptools'] are not considered extraneous packages.
--full, -f
    Allows ['extraneous', 'pipdeptree', 'pip', 'setuptools'] as extraneous
     packages.

Example output

$ extraneous.py
extraneous packages:
        smbprotocol
uninstall via:
        pip uninstall -y smbprotocol cryptography dataclasses pyspnego

Testing

  1. Clone the repo.
  2. Setup and activate a new venv.
  3. Install requirements.txt and test_requirements.txt into your venv.
  4. Run $ python setup.py test.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

extraneous-2.0.5-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

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