3 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
licensepy
Python Depedency License Check and License Header Formating.
licensepy is a Python dependency license check and license header check/format 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.
Configure the tool with a pyproject.toml file at the root directory of the project with a list of licenses to avoid. If dependencies of the project are found to use these flagged licenses, licensepy will exit with the count of these projects. Otherwise, it will exit with code 0. For the license header formatter, the exit code will be the count of the source code files with incorrect header.
Installing
Use pip to install licensepy in your project.
$ pip3 install licensepy
Command Line Arguments
Dependency license check
For the dependency license check, the following are the command line arguments.
$ licensepy check
- -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.
- -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.
- -j, --num-threads: Number of threads to use. Default is 1. Max is 32 [default: 1].
License header checker and formatter
For the license
$ licensepy format
- files: Positional arguments are the Python files to run license header checker/formatter.
- -l, --licensee: Licensee. Has precedence over value from config.
- -y, --license-year: License year. Has precedence over value from config.
- -s, --silent: Don't print any outputs. Default if false.
- -d, --dry-run: Don't run formatter. Only print outputs. Default if false.
- -j, --num-threads: Number of threads to use. Default is 1. Max is 32 [default: 1].
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
[tool.licensepy]
# List of licenses to avoid.
avoid = ["MIT"]
# header template: The template for the license header. {year}, {licensee}
# are placeholders that will be populated with values from command line
# or the config. The template can have the # at the beginning or not.
license_header_template = "# Copyright {year} {licensee}"
# license_year: The value to replace the {year} in the license_header_template.
# Default value is the current year.
license_year = 2025
# licensee: The value to replace the {licensee} in the license_header_template.
# If the {licensee} placeholder is found in the template and the licensee field
# or the command line argument are
licensee = "Nati"
This is the output when the above configuration is used for:
$ licensepy check
$ licensepy check --by-package
Metadata
Release files for licensepy 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
3 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| licensepy-1.1.2.tar.gz | 397.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| licensepy-1.1.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| licensepy-1.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| licensepy-1.1.2-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| licensepy-1.1.2-cp312-cp312-manylinux_2_39_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.39+ x86-64 | Details |
Total release size: 5.4 MB
Release files / licensepy-1.1.2.tar.gz
| Download URL | licensepy-1.1.2.tar.gz |
|---|---|
| Size | 397.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dde7f1eeea1544efb25539a3ab9b4d92a7fb5c6172ada906d07f7a00bc88a53e
|
|
BLAKE2b-256 checksum How to use checksums |
d37bcf0f548f0f495e821d53352723eebac93055b363102cd2ff62eab7914a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / licensepy-1.1.2-py3-none-win_amd64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | licensepy-1.1.2-py3-none-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4391e1bf0e2a9cac8687ca03aba3021ac9719957849dbdea8a5c656a3bf8abaf
|
|
BLAKE2b-256 checksum How to use checksums |
3352bfc90125f3773298b56123a351b32bc0c83de8b273bf1c76b0b9270581fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.11.4
|
Release files / licensepy-1.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | licensepy-1.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c954b5f25fecb33a15531f9dfdb7b4ded601e293ececf281e17ba7ac6b3c0e20
|
|
BLAKE2b-256 checksum How to use checksums |
1ca0a323370d2a75e1ca05a03d78b52b812a576a08ad68af3158699fae2f47c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.11.4
|
Release files / licensepy-1.1.2-py3-none-macosx_11_0_arm64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | licensepy-1.1.2-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e31b936959283d8ab132ba49be5499710480ca645a2a1636b2fc174d54fba81f
|
|
BLAKE2b-256 checksum How to use checksums |
0af7323c14ce8fcd63141fafcdf5385661b5f99cfc379d21b16d040fd8d25c4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.11.4
|
Release files / licensepy-1.1.2-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | licensepy-1.1.2-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
7b3f812eb2598d0f053cdf88edbd8190fbe721cd447ba1ea8dd5564029c99f4d
|
|
BLAKE2b-256 checksum How to use checksums |
0e7222223ccde97b87a16069a18bc9733755e3239473a592e657fabfdd351c03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|