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.5.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

licensepy-0.0.5-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: licensepy-0.0.5.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for licensepy-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ff0a10dbd69e182177d41ae53aceabd8e402bef6c8662e1b84db7299408b9e04
MD5 5ccf70e0570855268cbbf7b1720cca54
BLAKE2b-256 8b98aade3482318515dd234159db70d7e60c26068ddfe2b6074ca8e2345634b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: licensepy-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for licensepy-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6f2c83eeffdf13f5573998b5160fc65bc80ac3babc60d54908acf264b88cd484
MD5 1f95e5d9d9bb983b946cd6f618301527
BLAKE2b-256 c62663f107f286a191517815278786cff0fd25c7f4c8a7c25bb9e4000296ba45

See more details on using hashes here.

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