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.1.tar.gz (11.1 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.1-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyspdx-1.0.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.5.0-44-generic

File hashes

Hashes for pyspdx-1.0.1.tar.gz
Algorithm Hash digest
SHA256 743316663db3f79f4c98ad367d50dc1f4fb39e338dbbb0ccfee3c702b9a1875c
MD5 64c76e3bbac0afc4884f44e77808dcfb
BLAKE2b-256 bf66984acdb9c57232d9110a7af1c5ee6e64fcf0c0ca3f86ea0cbe5ae767a823

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyspdx-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.5.0-44-generic

File hashes

Hashes for pyspdx-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7fcbdbed4ce8991076b0c121863cded54b75c48f81ccfeafab0008b14b34c39
MD5 a3a258ade76ef79a4f6aa389d6de42b6
BLAKE2b-256 f0143d03426e35beea544491c8c885f8536b69dd3037c9058790c18f64dd1f28

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