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"]
    extensions=["zig", "py", "svelte"]
    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

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.20-cp311-abi3-win_amd64.whl (852.5 kB view details)

Uploaded CPython 3.11+Windows x86-64

spdx_checker-0.1.20-cp311-abi3-musllinux_1_2_x86_64.whl (1.7 MB view details)

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

spdx_checker-0.1.20-cp311-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.11+manylinux: glibc 2.12+ x86-64manylinux: glibc 2.17+ x86-64

spdx_checker-0.1.20-cp311-abi3-macosx_14_0_arm64.whl (446.1 kB view details)

Uploaded CPython 3.11+macOS 14.0+ ARM64

File details

Details for the file spdx_checker-0.1.20-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: spdx_checker-0.1.20-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 852.5 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","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

Hashes for spdx_checker-0.1.20-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c8657f0d65e26e41617b369351e73ee5036e2d52eb0c569e2d0431a39695aba8
MD5 fdc1224522f40e72cf6e643c0f318452
BLAKE2b-256 92a708f2dd7a6db066ba7d21c3ca7b68db820d8db3425e5f83a6a1e06c58ce11

See more details on using hashes here.

File details

Details for the file spdx_checker-0.1.20-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: spdx_checker-0.1.20-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.9.15 {"installer":{"name":"uv","version":"0.9.15","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

Hashes for spdx_checker-0.1.20-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5e43d2ff7cd9c4e02f21182b7f44f1009e55e07151b3d548909926560d42715e
MD5 3474aaaf37d7da68b7feb9957972256c
BLAKE2b-256 70bd534ec03558473a57b983e783f0efffaec1d5f2e8d26be4bacb6050967b65

See more details on using hashes here.

File details

Details for the file spdx_checker-0.1.20-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.20-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.9.15 {"installer":{"name":"uv","version":"0.9.15","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

Hashes for spdx_checker-0.1.20-cp311-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3006975fa905f6b3270044b797676d95c307d5a8b9b3813e53aca635c01b0fb
MD5 2e71b469562aebb6207c9f6739ceca52
BLAKE2b-256 99e05133f0870700717ae34005fa4b8da1bb3f5b469d28466bdfe3b96c4e8e12

See more details on using hashes here.

File details

Details for the file spdx_checker-0.1.20-cp311-abi3-macosx_14_0_arm64.whl.

File metadata

  • Download URL: spdx_checker-0.1.20-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.9.15 {"installer":{"name":"uv","version":"0.9.15","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

Hashes for spdx_checker-0.1.20-cp311-abi3-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f79b50e34dfe0a5dce3733fbd153c408062f19becfdc563524242bfe3a0722b6
MD5 cf22a1990cf454f1474337e98d7c6c0b
BLAKE2b-256 e2a29c139bcbe739651de6f5e182fe8275080841d4f8dc2af1ea07ba4fb32ece

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