SystemInfo

Cross-platform system information retrieval facade.

class SystemInfo[source]

Bases: object

Helper class for retrieving system information commonly needed in MDM scripts.

This class delegates to platform-specific implementations while preserving the original static-method API for backward compatibility.

static get_serial_number() str | None[source]

Get serial number of machine.

Delegates to the platform-specific implementation.

Returns:

Hardware serial number, or None if unavailable

Return type:

str | None

static get_console_user() tuple[str, int, Path] | None[source]

Get the currently logged in console user information.

Delegates to the platform-specific implementation.

Returns:

Tuple of username, uid, and home directory path

Return type:

tuple[str, int, Path] | None

static get_hostname() str[source]

Retrieve system hostname.

Returns:

System hostname

Return type:

str

static get_user_full_name(username: str) str | None[source]

Get the full name for a given username.

Delegates to the platform-specific implementation.

Parameters:

username (str) – Username to lookup

Returns:

Full name or None if unavailable

Return type:

str | None