Skip to main content

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"])

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spdx_checker-0.1.14-cp38-abi3-musllinux_1_2_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

spdx_checker-0.1.14-cp38-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.12+ x86-64manylinux: glibc 2.17+ x86-64

spdx_checker-0.1.14-cp38-abi3-macosx_14_0_arm64.whl (436.1 kB view details)

Uploaded CPython 3.8+macOS 14.0+ ARM64

File details

Details for the file spdx_checker-0.1.14-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for spdx_checker-0.1.14-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 10353ba9ad7b2a25fc7b1a7162b128d77eafe32923edc7819b5bfac1b8789dfd
MD5 65e819b5d5dc95b39383b42ff9770799
BLAKE2b-256 167155474f1d0eb007b83a575e3429ecc3d8ad1458d0d85a7a9c888fb8c24376

See more details on using hashes here.

File details

Details for the file spdx_checker-0.1.14-cp38-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spdx_checker-0.1.14-cp38-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3c74b06a6ac8df7aac65ea44d03cd12e416f0b8e6ccac8c2f6924b417e8dc4f
MD5 34a3ba8e137fd96957492747e983e856
BLAKE2b-256 b23f4a19ee1d748c9ee39fc303df1377bcd22ee7d4095626851b2716aed72569

See more details on using hashes here.

File details

Details for the file spdx_checker-0.1.14-cp38-abi3-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for spdx_checker-0.1.14-cp38-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7504d9617fa88c037f2f99bb42dd8d3b432b955f218ce15584dff421a0a823e2
MD5 e9787e4f0324dd9d875b39782c796a25
BLAKE2b-256 7d832a64bc901c9a476bbbe2557eec14423dbc390392cc3e3f76c882b7055fcf

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