Skip to main content

Alternative tool for listing Python packages

Project description

Installation

Once you have installed Python and its packages manager pip, depending on if you want only this tool, the full set of PNU tools, or PNU plus a selection of additional third-parties tools, use one of these commands:

pip install pnu-pipinfo
pip install PNU
pip install pytnix

PIPINFO(1)

NAME

pipinfo - Alternative tool for listing Python packages

SYNOPSIS

pipinfo [-l|--check-latest] [-v|--check-vulns] [-c|--no-color] [-p|--no-progress] [-i|--info] [-S|--system] [-U|--user] [-I|--issues] [-O|--outdated] [-L|--latest|--uptodate] [-V|--vulnerable] [-H|--healthy|--sane] [-N|--not-required] [-R|--required] [--debug] [--help|-?] [--version] [--] [directory ...]

DESCRIPTION

The pipinfo utility provides an alternative to the "pip list", "pip list --outdated", "pip show" and "pip-audit" commands.

It shows all the available packages in the Python PATH (not just the latest version) or given directories (even for different Python versions), differenciates user and system-wide packages (user packages are written in bright style), show duplicate packages (name in yellow foreground, including user versions shadowing system ones), shows each package summary (avoiding the use of "pip show" to discover what a package is about), and prints the count of installed packages.

With the -l|--check-latest option, it will also use a Python Index Package web service to check for the latest versions available, using a simple color (version in yellow foreground) or visual scheme to show outdated packages and count them.

With the -v|--check-vulns option, it will also use another Python Index Package web service to check for known vulnerabilities in your packages versions, using a simple color (version in red background) or visual scheme to show vulnerable packages and count them.

The color or visual scheme should be enough to tell you to upgrade the indicated packages, however you can print additional details about new versions available and vulnerabilities with the -i|--info option.

You can disable the color output with the -c|--no-color option, and the progress meter with the -p|--no-progress option.

Finally you can restrict the list to the user or system packages, outdated or up-to-date packages, vulnerable or sane packages, required or not packages with the options in upper case.

The most useful one is probably the -I|--issues option which will select the outdated or vulnerable packages only.

OPTIONS

Options Use
-l|--check-latest Check latest versions
-v|--check-vulns Check vulnerabilities
-c|--no-color Toggle off color output
-p|--no-progress Toggle off progress meter
-i|--info Print detailed info on versions & vulnerabilities
-S|--system Select only system packages
-U|--user Select only user packages
-L|--latest|--uptodate Select only latest packages (implies -l)
-O|--outdated Select only outdated packages (implies -l)
-H|--healthy|--sane Select only healthy packages (implies -v)
-V|--vulnerable Select only vulnerable packages (implies -v)
-R|--required Select only required packages
-N|--not-required Select only not required packages
-I|--issues Select all packages with issues (-O & -V)
--debug Enable debug mode
--help|-? Print usage and a short help message and exit
--version Print version and exit
-- Options processing terminator

ENVIRONMENT

The PIPINFO_DEBUG environment variable can be set to any value to enable debug mode. It's mostly used to display and debug the package requirements read from the Python packages metadata files.

The LOCALAPPDATA and TMP environment variables under Windows, and HOME, TMPDIR and TMP environment variables under other operating systems can influence the caching directory used.

FILES

The pipinfo utility will attempt to maintain a caching directory for the web services it uses, where the individual files will be re-used within the next 24 hours.

This directory will be located in one of the following places:

  • Windows:
    • %LOCALAPPDATA%\cache\pipinfo
    • %TMP%\cache\pipinfo
  • Unix:
    • ${HOME}/.cache/pipinfo
    • ${TMPDIR}/.cache/pipinfo
    • ${TMP}/.cache/pipinfo

EXIT STATUS

The pipinfo utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

Use the following command to print a package listing after checking for the existence of new versions or vulnerabilities:

pipinfo -lv

Use the following command to restrict the list to outdated and vulnerable packages with details but no progress meter:

pipinfo -Iip

SEE ALSO

pip, pip-audit

STANDARDS

The pipinfo utility is not a standard UNIX command.

It tries to follow the PEP 8 style guide for Python code.

PORTABILITY

Tested OK under Windows.

HISTORY

This implementation was made for the PNU project, both for my personal convenience and also to investigate some pip issues with the pip list --outdated option.

LICENSE

It is available under the 3-clause BSD license.

AUTHORS

Hubert Tournier

CAVEATS

The conditions on package dependencies aren't taken into account (yet). "pipinfo -N" will nonetheless give appoximately the same results than "pip list --not-required".

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

pnu-pipinfo-0.9.2.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

pnu_pipinfo-0.9.2-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pnu-pipinfo-0.9.2.tar.gz.

File metadata

  • Download URL: pnu-pipinfo-0.9.2.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pnu-pipinfo-0.9.2.tar.gz
Algorithm Hash digest
SHA256 ca2cf9c790181801322b38abcb7ee1f9b375490948e80cf9f30d8e17b16239ed
MD5 72bb85af6aab60a3a4b1c0171c64c942
BLAKE2b-256 1c41278e3a407c343c5f629b795ec5330a5e3e0ed995e87c4916f76066923ba2

See more details on using hashes here.

File details

Details for the file pnu_pipinfo-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: pnu_pipinfo-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pnu_pipinfo-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a862215969f8ac91356062847af35a844d047ac7d9d1d5cad6b8e8402566971c
MD5 b1323fb2d17cf67c6971265162339ee0
BLAKE2b-256 7495b961e1419006bc4b47dc0fcf8d0a5a1bfd828f3b3f9114a4462e4861b730

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