Skip to main content

Dump the software license list of Python packages installed with pip.

Project description

pip-licenses-cli

Dump the software license list of Python packages installed with pip.

Description

pip-licenses-cli is a CLI tool for checking the software licenses of installed Python packages with pip.

Implemented with the idea inspired by composer licenses command in Composer (a.k.a PHP package management tool): https://getcomposer.org/doc/03-cli.md#licenses

This is a fork of the original pip-licenses project. While pip-licenses-cli provides a CLI, pip-licenses-lib provides the library functionality. The CLI builds upon the library.

pip-licenses-cli is usable as a drop-in replacement for pip-licenses<=5.0.0. More recent versions might be compatible, but use a partially different code base and possibly other/additional parameters for example.

The initial goal was to provide a drop-in replacement for the unmaintained pip-licenses package. In the meantime, the original package got a new maintainer. This fork will continue to be maintained as usual.

Installation

You can install this package from PyPI:

python -m pip install pip-licenses-cli

If you want to additionally parse license declarations with SPDX expressions, then also install the spdx extra:

python -m pip install 'pip-licenses-cli[spdx]'

Alternatively, you can use the package from source directly after installing the required dependencies.

Usage

Execute the command with your venv (or virtualenv) environment.

# Install packages in your venv environment
(venv) $ pip install Django pip-licenses-cli

# Check the licenses with your venv environment
(venv) $ pip-licenses
 Name    Version  License
 Django  2.0.2    BSD
 pytz    2017.3   MIT

For further details, see the detailed docs.

About UnicodeEncodeError

If a UnicodeEncodeError occurs, check your environment variables LANG and LC_TYPE. Additionally, you can set PYTHONIOENCODING to override the encoding used for stdout.

This mostly occurs in isolated environments such as Docker and tox.

See useful reports:

Dependencies

pip-licenses-cli has been implemented in the policy to minimize the dependencies on external packages.

  • pip-licenses-lib by the same authors as the CLI (MIT License).
  • prettytable by Luke Maurits, subject to the BSD-3-Clause License.
    • Note: This package implicitly requires wcwidth by Jeff Quast (MIT License), which itself contains data derived from the Unicode standard (Unicode-3.0 License).
  • For Python < 3.11: tomli by Taneli Hukkinen under the MIT License.

If you are using SPDX support with the spdx extra, the following additional dependencies are required:

Contributing

See contribution guidelines.

License

This package is subject to the terms of the MIT license.

Disclaimer

All results are generated automatically from the data supplied by the corresponding package maintainers and provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. No generated content should be considered or used as legal advice. Consult an Attorney for any legal advice.

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_licenses_cli-4.1.0.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pip_licenses_cli-4.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file pip_licenses_cli-4.1.0.tar.gz.

File metadata

  • Download URL: pip_licenses_cli-4.1.0.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pip_licenses_cli-4.1.0.tar.gz
Algorithm Hash digest
SHA256 8a07b33d59346944bffcd12abfb81070591abf362c597d0e044d61178d628d68
MD5 f8850f8cf5f54ca59057b97549528b7f
BLAKE2b-256 2e67e50a77ab33449777a37fcbf075a412a38423859bc9c051682b83ad640069

See more details on using hashes here.

Provenance

The following attestation bundles were made for pip_licenses_cli-4.1.0.tar.gz:

Publisher: release.yml on stefan6419846/pip-licenses-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pip_licenses_cli-4.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pip_licenses_cli-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76ccd6882cdbb446ed41bd8bd157b201905f191c0532e1aeaa9ba6de6199c3e3
MD5 a728f9ef5599d0e5f82b3ff6a460d607
BLAKE2b-256 153f4653d7c5ed839b5dc10c1adc6a2e7f93aa17bbc95ded5f04f013864618b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pip_licenses_cli-4.1.0-py3-none-any.whl:

Publisher: release.yml on stefan6419846/pip-licenses-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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