uswid.link¶

class uswid.link.uSwidLink(href: str | None = None, rel: uSwidLinkRel | None = None, use: uSwidLinkUse | None = None, spdx_id: str | None = None)¶

Represents a SWID link

__init__(href: str | None = None, rel: uSwidLinkRel | None = None, use: uSwidLinkUse | None = None, spdx_id: str | None = None)¶

Initializes uSwidLink

component: uSwidComponent | None¶

Component, if the SWID reference in internally resolvable

property href: str | None¶

Returns href

property href_for_display: str | None¶

Returns href as an HTML URI

problems() → List[uSwidProblem]¶

Checks the link for common problems

property rel: uSwidLinkRel | None¶

Returns rel, guessing from the href if not provided

property spdx_id: str | None¶

Returns the SPDX ID from the URL, if possible

class uswid.link.uSwidLinkRel(value)¶

Represents an enumerated types of link

ANCESTOR = 1¶
COMPILER = -1¶
COMPONENT = 2¶
FEATURE = 3¶
INSTALLATION_MEDIA = 4¶
LICENSE = -2¶
PACKAGE_INSTALLER = 5¶
PARENT = 6¶
PATCHES = 7¶
REQUIRES = 8¶
SEE_ALSO = 9¶
SUPERSEDES = 10¶
SUPPLEMENTAL = 11¶
UNKNOWN = 0¶
classmethod from_string(value: str) → uSwidLinkRel¶

Creates a uSwidLinkRel from a string identifier

class uswid.link.uSwidLinkUse(value)¶

Represents an enumerated uses of link

OPTIONAL = 1¶
RECOMMENDED = 3¶
REQUIRED = 2¶

python-uswid

Navigation

  • Basic API usage
  • Version history
  • Container
  • Entity
  • Enums
  • Errors
  • Format
  • Component
  • Link
    • uSwidLink
    • uSwidLinkRel
    • uSwidLinkUse
  • Payload
  • Hash
  • Evidence
  • VEX Document
  • VEX Product
  • VEX Statement
  • PURL

Related Topics

  • Documentation overview
    • Previous: uswid.component
    • Next: uswid.payload
©2021, Richard Hughes.