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
hrefif 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