cyclonedx.factory.license

Deprecated since version next.

Classes

LicenseFactory

Deprecated — Alias of cyclonedx.contrib.license.factories.LicenseFactory.

Module Contents

class cyclonedx.factory.license.LicenseFactory

Bases: cyclonedx.contrib.license.factories.LicenseFactory

Deprecated — Alias of cyclonedx.contrib.license.factories.LicenseFactory.

Deprecated since version next: This re-export location is deprecated. Use from cyclonedx.contrib.license.factories import LicenseFactory instead. The exported symbol itself is NOT deprecated — only this import path.

make_from_string(value: str, *, license_text: cyclonedx.model.AttachedText | None = None, license_url: cyclonedx.model.XsUri | None = None, license_acknowledgement: cyclonedx.model.license.LicenseAcknowledgement | None = None) cyclonedx.model.license.License

Make a cyclonedx.model.license.License from a string.

make_with_expression(expression: str, *, acknowledgement: cyclonedx.model.license.LicenseAcknowledgement | None = None) cyclonedx.model.license.LicenseExpression

Make a cyclonedx.model.license.LicenseExpression with a compound expression.

Utilizes cyclonedx.spdx.is_expression().

Raises:

InvalidLicenseExpressionException – if param value is not known/supported license expression

make_with_id(spdx_id: str, *, text: cyclonedx.model.AttachedText | None = None, url: cyclonedx.model.XsUri | None = None, acknowledgement: cyclonedx.model.license.LicenseAcknowledgement | None = None) cyclonedx.model.license.DisjunctiveLicense

Make a cyclonedx.model.license.DisjunctiveLicense from an SPDX-ID.

Raises:

InvalidSpdxLicenseException – if param spdx_id was not known/supported SPDX-ID

make_with_name(name: str, *, text: cyclonedx.model.AttachedText | None = None, url: cyclonedx.model.XsUri | None = None, acknowledgement: cyclonedx.model.license.LicenseAcknowledgement | None = None) cyclonedx.model.license.DisjunctiveLicense

Make a cyclonedx.model.license.DisjunctiveLicense with a name.