Skip to main content

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

Install the project in editable mode and run both test suites:

uv pip install -e .
uv run pytest
zig test extension/tests.zig

The native extension is organized into four boundaries:

  • extension/core: configuration, checking, headers, and aggregate results
  • extension/filesystem: path selection, glob matching, and file mutation
  • extension/presentation: streamed terminal output and colors
  • extension/python: CPython argument, exception, and module adapters

The checker core does not depend on CPython or terminal presentation. It emits transient events and returns a constant-size aggregate report, so report memory does not grow with the number of checked files.

License

MIT

Metadata

Release files for spdx_checker 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for spdx_checker 0.1.23
File Actions
spdx_checker-0.1.23-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for spdx_checker-0.1.23-cp311-abi3-win_amd64.whl
spdx_checker-0.1.23-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for spdx_checker-0.1.23-cp311-abi3-musllinux_1_2_x86_64.whl
spdx_checker-0.1.23-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for spdx_checker-0.1.23-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
spdx_checker-0.1.23-cp311-abi3-macosx_14_0_arm64.whl CPython 3.11 abi3 macOS 14.0+ ARM64 Details for spdx_checker-0.1.23-cp311-abi3-macosx_14_0_arm64.whl

Total release size: 6.3 MB

Release files / spdx_checker-0.1.23-cp311-abi3-win_amd64.whl

Download URL spdx_checker-0.1.23-cp311-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
46c86e39983bc8162fc2800323fb0454ea48a18647abbbc7c53bca09a23a09f6
BLAKE2b-256 checksum
How to use checksums
3df84ff05f02132cc0eb2d687a3913f453784ca23a102280aa14b725d24569f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Release files / spdx_checker-0.1.23-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL spdx_checker-0.1.23-cp311-abi3-musllinux_1_2_x86_64.whl
Size 2.1 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
e3d0d9429f97dd6dbf74fb48d5f0cd8379b0e6f4eaaa391ed1dbc5cbb89485f5
BLAKE2b-256 checksum
How to use checksums
0f06333d974c6322c7c2aa4b78f5410e58cea2dd20c12db8ffdf6b48a9d4fbcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Release files / spdx_checker-0.1.23-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL spdx_checker-0.1.23-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d8fe4d750659edada5a54fe8528e5cb10c27124df9e3a4f5b4916b13231e5eb8
BLAKE2b-256 checksum
How to use checksums
039335fd7d5eb3c63094e5e907db845b6a4c9f2b490a97947e6f7f1549a96b92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Release files / spdx_checker-0.1.23-cp311-abi3-macosx_14_0_arm64.whl

Download URL spdx_checker-0.1.23-cp311-abi3-macosx_14_0_arm64.whl
Size 677.8 kB
Tags CPython 3.11 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
e79aa1bf54cc7a7364dca715d03575aff6b293e538eba20b8bf48cb6b865647e
BLAKE2b-256 checksum
How to use checksums
bae99f45f818a6f0e123a208cec9d9cf5f7b34f322f2b08a247aba614f9f468c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Security for spdx_checker 0.1.23

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page