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.1.tar.gz (361.1 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.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for licensepy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 307f6e7f2b0c0a5d5073d475573d09ef6b86794d529453743f9bbf41f054fd9d
MD5 c6253e72deac0422321a5e58e45fe44e
BLAKE2b-256 c5f967bc61cbf848e3ee078ac1430d139b710a1fb91cf5ae09032ee53e346c6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for licensepy-1.0.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 f3ccda5e66b703abe5faa2265423a1aac025ffabbd6e7f41204acd8bac7d00e8
MD5 94899795eec62ed4f4bf0e134897a7c1
BLAKE2b-256 0097cc1a0f8d158e6615565f43a248f3eb63f1f627345b2ea30f2751d94f787c

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