Skip to main content

licencepy is a Python dependency license check library with recursive dependency handling for pip.

Project description

licensepy: Python License Check Module.

licensepy is a Python dependency license check library with recursive dependency handling for pip (and conda in the future). This package has recusive dependency checks that are not offered by many existing license check libraries. By default, the output will gorup packages by their licenses.

Command line arguments can be used to recusively check all the dependencies of the project (-r, --recursive), group output by pacakges in alphabetical order (--by-package), silence all outputs (-s, --silent), or only print fails (-f, --print-fails).

Configure the tool with a pyproject.toml file at the root directory of the project with a list of licenses to avoid. If any one the dependencies of the project use these flagged licenses, licensepy will exit with code 1. Otherwise, it will exit with code 0.

Installing

Use pip to install licensepy in your project.

pip3 install licensepy

Command Line Arguments

  1. -r, --recursive: Recursively find all the dependencies of the project and their licences.
    • Recusive dependencies will have the color red if they have licenses that have been flagged to avoid and green otherwise.
  2. -by-package: Groupt output by packages in alphabetial order.
  3. -s, silent: Silence all outputs.
  4. -f, print-fails: Only print the packages whose licenses are flagged to be avoided.

Configuration

Licenses can be flagged to avoid in a pyproject.toml files saved in the root of the project directory. Licenses should be stored in a list.

# In the pyproject.toml file

[licensepy]
avoid = ["MIT"]

This is the output when the above configuration is used for:

  1. licensepy
    

  2. licensepy --by-package
    

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

licensepy-0.0.4.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

licensepy-0.0.4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file licensepy-0.0.4.tar.gz.

File metadata

  • Download URL: licensepy-0.0.4.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for licensepy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 42dac0b98bb49ed9d383dfadeff7c836e2bf102461343dde86e12fe94f26fe8e
MD5 65e603d6b2b31033bd591bec896851e4
BLAKE2b-256 6c89e8bf9dae0649c2ba241933ab8499e836b3db549fa13ea3e3753e74225849

See more details on using hashes here.

File details

Details for the file licensepy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: licensepy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for licensepy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 632854ea9ee6f924dfaf1b7ab4cbf8c7fc48b43a8965faaefec90b65e322618b
MD5 dc03928fd5e7ff094bc6df99f1c1c68e
BLAKE2b-256 a4bc899b602d4234926fe80630b207f51f0c3d32591416cacb70db657f90b146

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