Skip to content

OsRelease

Parsed operating-system identification data with standard-aware projections.

Named fields apply the defaults and conversions prescribed by the os-release specification.

Inherits from: Iterable[Tuple[Str, Str]]

Implements: std.Index[Str, Str], std.Unpack[Str, Str]

Fields

ansi_color @ (term.Style | nil)

The terminal style specified by ANSI_COLOR, if defined.

ansi_color_reverse @ (term.Style | nil)

The terminal style specified by ANSI_COLOR_REVERSE, if defined.

bug_report_url @ (url.Url | nil)

The bug-report URL, if valid and defined.

build_id @ (Str | nil)

The build identifier, if defined.

confext_level @ (Str | nil)

The configuration-extension compatibility level, if defined.

confext_scope @ Set[ExtensionScope]

An ordered set of configuration-extension scopes.

cpe_name @ (Str | nil)

The CPE name, if defined.

default_hostname @ (Str | nil)

The default hostname, if defined.

display_name @ term.Text

The fancy name when available, otherwise the ANSI-colored presentation name.

documentation_url @ (url.Url | nil)

The documentation URL, if valid and defined.

experiment @ (Str | nil)

The experiment identifier, if defined.

experiment_url @ (url.Url | nil)

The experiment URL, if valid and defined.

fancy_name @ (term.Text | nil)

The preformatted fancy presentation name, if defined.

home_url @ (url.Url | nil)

The project's home page, if valid and defined.

id @ Str

The operating-system identifier, defaulting to linux.

id_like @ Set[Str]

An ordered set of compatible operating-system identifiers.

image_id @ (Str | nil)

The image identifier, if defined.

image_version @ (Str | nil)

The image version, if defined.

logo @ (Str | nil)

The icon name for the operating system, if defined.

name @ Str

The operating system name, defaulting to Linux.

portable_prefixes @ Set[Str]

An ordered set of portable-service unit-name prefixes.

portable_scope @ (:SYSTEM: | :USER: | :ANY: | Str)

The portable-service scope, defaulting to :SYSTEM:.

pretty_name @ Str

The presentation name, defaulting to Linux.

privacy_policy_url @ (url.Url | nil)

The privacy-policy URL, if valid and defined.

release_type @ (:STABLE: | :LTS: | :DEVELOPMENT: | :EXPERIMENT:)

The release channel symbol, defaulting to :STABLE:.

support_end @ (time.Date | nil)

The support end date, in UTC, if valid and defined.

support_url @ (url.Url | nil)

The support URL, if valid and defined.

sysext_level @ (Str | nil)

The system-extension compatibility level, if defined.

sysext_scope @ Set[ExtensionScope]

An ordered set of system-extension scopes.

variant @ (Str | nil)

The human-readable operating-system variant, if defined.

variant_id @ (Str | nil)

The operating-system variant identifier, if defined.

vendor_name @ (Str | nil)

The vendor name, if defined.

vendor_url @ (url.Url | nil)

The vendor's URL, if valid and defined.

version @ (Str | nil)

The human-readable operating-system version, if defined.

version_codename @ (Str | nil)

The operating-system version codename, if defined.

version_id @ (Str | nil)

The operating-system version identifier, if defined.

Methods

(index) key -> Str

Reads a parsed os-release assignment by key.

Parameters

NameTypeDescription
key Str

(iter)() -> Iter[Tuple[Str, Str]]

Iterates the parsed os-release assignments.

(unpack)()

Destructures the parsed os-release assignments.