cyclonedx.model.license

License related things

Attributes

LicenseExpressionAcknowledgement

Deprecated — Alias for LicenseAcknowledgement

License

TypeAlias for a union of supported license models.

Classes

LicenseAcknowledgement

This is our internal representation of the type_licenseAcknowledgementEnumerationType ENUM type

DisjunctiveLicense

This is our internal representation of licenseType complex type that can be used in multiple places within

LicenseExpression

This is our internal representation of licenseType's expression type that can be used in multiple places within

LicenseRepository

Collection of License.

Module Contents

class cyclonedx.model.license.LicenseAcknowledgement

Bases: str, enum.Enum

This is our internal representation of the type_licenseAcknowledgementEnumerationType ENUM type within the CycloneDX standard.

Note

Introduced in CycloneDX v1.6

CONCLUDED = 'concluded'
DECLARED = 'declared'
cyclonedx.model.license.LicenseExpressionAcknowledgement

Deprecated — Alias for LicenseAcknowledgement

Deprecated since version next: Import LicenseAcknowledgement instead. The exported original symbol itself is NOT deprecated - only this import path.

class cyclonedx.model.license.DisjunctiveLicense

This is our internal representation of licenseType complex type that can be used in multiple places within a CycloneDX BOM document.

Note

See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_licenseType

id: str | None
name: str | None
bom_ref: cyclonedx.model.bom_ref.BomRef
text: cyclonedx.model.AttachedText | None
url: cyclonedx.model.XsUri | None
acknowledgement: LicenseAcknowledgement | None
class cyclonedx.model.license.LicenseExpression

This is our internal representation of licenseType’s expression type that can be used in multiple places within a CycloneDX BOM document.

value: str
bom_ref: cyclonedx.model.bom_ref.BomRef
acknowledgement: LicenseAcknowledgement | None
cyclonedx.model.license.License

TypeAlias for a union of supported license models.

class cyclonedx.model.license.LicenseRepository

Bases: sortedcontainers.SortedSet[License]

Collection of License.

This is a set, not a list. Order MUST NOT matter here. If you wanted a certain order, then you should also express whether the items are concat by AND or OR. If you wanted to do so, you should use LicenseExpression.

As a model, this MUST accept multiple LicenseExpression along with multiple DisjunctiveLicense, as this was an accepted in CycloneDX JSON before v1.5. So for modeling purposes, this is supported. Denormalizers/deserializers will be thankful. The normalization/serialization process SHOULD take care of these facts and do what is needed.