Platforms

extra_platforms.platform API

Platforms, also known as Operating Systems.

Everything here can be aggressively cached and frozen, as it’s only compute platform-dependent values.

class extra_platforms.platform.Platform(id, name, icon='❓')[source]

Bases: object

A platform can identify multiple distributions or OSes with the same characteristics.

It has a unique ID, a human-readable name, and boolean to flag current platform.

id: str

Unique ID of the platform.

name: str

User-friendly name of the platform.

icon: str = '❓'

Icon of the platform.

current: bool

True if current environment runs on this platform.

info()[source]

Returns all platform attributes we can gather.

Return type:

dict[str, str | bool | None | dict[str, str | None]]

extra_platforms.platform_data API

Platform definitions and metadata.

extra_platforms.platform_data.XENSERVER = Platform(id='xenserver', name='XenServer', current=False)

All individual platforms.