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
- -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.
- Recursive dependencies will have the color red if they have licenses that have been flagged to avoid and green otherwise.
- -by-package: Group output by packages in alphabetical order.
- -s, silent: Silence all outputs.
- -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:
-
licensepy
-
licensepy --by-package
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b89a6b715455f996214686e44d454e1e4aa82c2090b37396a982a7668f9955e
|
|
| MD5 |
875ac1443d3c249f4ef2a3bfa17a8f81
|
|
| BLAKE2b-256 |
352566f87e0bf6be87e5c483713cb1dde46d6af7bb7e11d361947f47243bb92e
|
File details
Details for the file licensepy-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: licensepy-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
966d79861bd33e1b05909e76708c473a7f73e2c44aa8194033750f78cbd25141
|
|
| MD5 |
3f24dbaf42fcf914c4d9de7a0acfe271
|
|
| BLAKE2b-256 |
ac38e8463d1bb8282507aa049deca5a67ec6393b350140794391b17753066cd5
|