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 details)

Uploaded Python 3

File details

Details for the file extraneous-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: extraneous-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for extraneous-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0dac4256baebdea1753833d6caba131bcd7cde35cd2ae3166976018036d75177
MD5 477e4be5e1f6e4ced4ca91958ee2801a
BLAKE2b-256 20f86145528060ac3695d5ff11ada994151696fc4896b46c96f8645b59d41d75

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