snakia.platform.linux

Classes

LinuxLayer(platform)

PlatformLayer(platform)

PlatformOS(value)

An enumeration.

class snakia.platform.linux.LinuxLayer(platform)[source]

Bases: PlatformLayer[Literal[LINUX]]

__init__(platform)
codename()[source]

Return the distro codename.

Return type:

str

distro_id()[source]

Return the distro id.

Return type:

str

distro_name()[source]

Return the distro name.

Return type:

str

distro_pretty_name()[source]

Return the distro pretty name.

Return type:

str

os_release()[source]

Parse os_release_raw and return a dict

Return type:

dict[str, str]

os_release_raw()[source]

Read /etc/os-release or /usr/lib/os-release

Return type:

str

target: ClassVar[PlatformOS] = 4
classmethod try_get(platform, /)
Return type:

Optional[Self]

version()[source]

Return the distro version.

Return type:

str