cyclonedx.spdx

Functions

is_supported_id(→ bool)

Validate SPDX-ID according to current spec.

fixup_id(→ Optional[str])

Fixup SPDX-ID.

is_expression(→ bool)

Validate SPDX license expression.

Module Contents

cyclonedx.spdx.is_supported_id(value: str) bool

Validate SPDX-ID according to current spec.

cyclonedx.spdx.fixup_id(value: str) str | None

Fixup SPDX-ID.

Returns:

repaired value string, or None if fixup was unable to help.

cyclonedx.spdx.is_expression(value: str) bool

Validate SPDX license expression.

Note

Utilizes license-expression library to validate SPDX compound expression according to SPDX license expression spec.