Skip to main content

Validate SPDX expressions

Project description

pyspdx

Short library to validate SPDX expressions. I have not found any working implementation in python and I wanted to mess around with pyparsing anyways.

API / Usage

This lib only exposes one function:

from pyspdx import validate

validate("MIT")  # Valid, does nothing
validate("NotValid") # Throws ValueError
validate("(Apache-2.0 OR MIT) AND BSD-3-Clause") # Valid
validate("(DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2 OR (Apache-2.0 AND PostgreSQL OR OpenSSL)) AND (BSD-3-Clause OR Apache-2.0 WITH 389-exception)") # Valid

Used Sources

Project details


Download files

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

Source Distribution

pyspdx-1.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

pyspdx-1.0.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file pyspdx-1.0.0.tar.gz.

File metadata

  • Download URL: pyspdx-1.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-47-generic

File hashes

Hashes for pyspdx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 62a0595e7a2f841ec29e4fa7ec9c118d1b83de04f5210a55a9ef885973926f26
MD5 53e4f952eb38bbc594c150460a86f825
BLAKE2b-256 e1f26ecfea8110cc732e03583cdccc420dd770f65adb3816c36ce07356144b81

See more details on using hashes here.

File details

Details for the file pyspdx-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyspdx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-47-generic

File hashes

Hashes for pyspdx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7962792391dc4a7f27105356b1679afe45ca60378d0870a8005664054fe4445
MD5 d9297fe009d7113c25e053b17237c095
BLAKE2b-256 fbc92f55362ab44b833cd8a7d3027bebdbe2964a9439fe69799d57af857b4e60

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