Platforms

extra_platforms.platforms API

Platform definitions and metadata.

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

class extra_platforms.platforms.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.platforms.XENSERVER = Platform(id='xenserver', name='XenServer', current=False)

All individual platforms.