Skip to main content

A Rust CLI packaged for Python

Project description

licensepy: Python License Check Module.

licensepy is a Python dependency license check library written in Rust. This package has recursive dependency checks that are not offered by many existing license check libraries. By default, the output will group packages by their licenses.

Command line arguments can be used to recursively find all the dependencies of the project (-r, --recursive), group output by packages 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.
    • Recursive dependencies will have the color red if they have licenses that have been flagged to avoid and green otherwise.
  2. -by-package: Group output by packages in alphabetical 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-1.0.0.tar.gz (361.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-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

File details

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

File metadata

  • Download URL: licensepy-1.0.0.tar.gz
  • Upload date:
  • Size: 361.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.2

File hashes

Hashes for licensepy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b89a6b715455f996214686e44d454e1e4aa82c2090b37396a982a7668f9955e
MD5 875ac1443d3c249f4ef2a3bfa17a8f81
BLAKE2b-256 352566f87e0bf6be87e5c483713cb1dde46d6af7bb7e11d361947f47243bb92e

See more details on using hashes here.

File details

Details for the file licensepy-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for licensepy-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 966d79861bd33e1b05909e76708c473a7f73e2c44aa8194033750f78cbd25141
MD5 3f24dbaf42fcf914c4d9de7a0acfe271
BLAKE2b-256 ac38e8463d1bb8282507aa049deca5a67ec6393b350140794391b17753066cd5

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