Fast SPDX License Checker for Source Code
Project description
SPDX License Checker
spdx-checker is a fast Python package for validating and analyzing SPDX license headers in your projects. It leverages Zig for exceptional speed and efficiency. The checker raises an error immediately if any file contains an incorrect or missing license header.
Supported platforms
The wheels published by the GitHub Actions workflow are built with cibuildwheel. The table below lists all supported operating systems and Python versions for the pre-built wheels.
| Operating System | Python versions / ABI |
|---|---|
| macOS (arm64) | 3.11, 3.12, 3.13 (cp311, cp312, cp313 — macosx_arm64) |
| manylinux (x86_64) | 3.11, 3.12, 3.13 (cp311, cp312, cp313 — manylinux_x86_64) |
| musllinux (x86_64) | 3.11, 3.12, 3.13 (cp311, cp312, cp313 — musllinux_x86_64) |
| Windows (amd64) | 3.11, 3.12, 3.13 (cp311, cp312, cp313 — win_amd64) |
Example Usage
import spdx_checker
spdx_checker.check_license(
"MIT",
["example1.py", "example2.svelte", "example3.html"]
extensions=["zig", "py", "svelte"]
exclude=["**/__init__.py"]
fix=True,
continue_on_error=False
)
Development
Issues with uv caching
To force uv to ignore existing installed versions, pass --reinstall to any installation command (e.g., uv sync --reinstall or uv pip install --reinstall ...).
License
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 Distributions
Built Distributions
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 spdx_checker-0.1.21-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: spdx_checker-0.1.21-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 852.6 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5873ce70a12ba19ac8d85b40c84b58402fc2259c029596839f3f5f3d3c84e511
|
|
| MD5 |
030eb51357e1205c5a7b8a897e08d1aa
|
|
| BLAKE2b-256 |
c8415aee8eac890fbe0cc68a8b7b02b9c1d11f6c6353ef6efaa754b4ab6b7988
|
File details
Details for the file spdx_checker-0.1.21-cp311-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: spdx_checker-0.1.21-cp311-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3889d6c278ff5dbae7f9f04d5236d41244b89b85e6a48fe519df9044f7ffba3c
|
|
| MD5 |
dd1c66f4b5c349c3a4a039b0f70fda3c
|
|
| BLAKE2b-256 |
be519b6555f998cdcf95ac2157792bf5a89366854f8bc1828bfe67ae3e05ed33
|
File details
Details for the file spdx_checker-0.1.21-cp311-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: spdx_checker-0.1.21-cp311-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11+, manylinux: glibc 2.12+ x86-64, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4d80994f64ce85a310205229f0ac1a4ec4b710e0f32141cc1e1d1be46dc1316
|
|
| MD5 |
7279f1c79638df806a7470c279efecc1
|
|
| BLAKE2b-256 |
304a44690e1b04719586803dee4354a116c5da85993d55ca40de9c43a5f2deaa
|
File details
Details for the file spdx_checker-0.1.21-cp311-abi3-macosx_14_0_arm64.whl.
File metadata
- Download URL: spdx_checker-0.1.21-cp311-abi3-macosx_14_0_arm64.whl
- Upload date:
- Size: 446.1 kB
- Tags: CPython 3.11+, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0843a0ea8a1cb4c61b1968acd0edfe7e9803d11b01ca4589ad3b37d7ffd032ce
|
|
| MD5 |
eaabf32a46f1e3f95bf1d299d145d9ac
|
|
| BLAKE2b-256 |
e96bf3ef6bcbffef3ec8bf01b07244db3a73e65d569394ebf4439d4fb00af49e
|