smah.settings.system.operating_system.info

class smah.settings.system.operating_system.info.BSDInfo(config_data=None, fetch=False)[source]

Bases: BaseInfo

Represents BSD-specific OS details.

errors

List of errors encountered during initialization.

Type:

list

source

The source of the OS details.

Type:

str

details

The OS details.

Type:

dict

vsn

Version string.

Type:

str

configured

Indicates if the details are configured.

Type:

bool

static info() Tuple | None[source]
static kind()[source]

Returns the kind of the OS details.

Returns:

The kind of the OS details.

Return type:

str

static uname_details() Tuple | None[source]

Retrieves OS details using the uname command.

Returns:

A tuple containing the source and details dictionary.

Return type:

tuple

class smah.settings.system.operating_system.info.BaseInfo(kind: str, config_data=None, fetch=False)[source]

Bases: object

CONFIG_VSN = '0.0.1'
static config_vsn()[source]
static info() Tuple | None[source]
is_configured()[source]

Checks if the OS details are configured.

Returns:

True if the details are configured, False otherwise.

Return type:

bool

show(options=None)[source]
to_yaml(options=None)[source]

Converts the OS details to a YAML-compatible dictionary.

Returns:

The OS details in YAML format.

Return type:

dict

class smah.settings.system.operating_system.info.DarwinInfo(config_data=None, fetch=False)[source]

Bases: BaseInfo

Represents Darwin (macOS)-specific OS details.

errors

List of errors encountered during initialization.

Type:

list

source

The source of the OS details.

Type:

str

details

The OS details.

Type:

dict

vsn

Version string.

Type:

str

configured

Indicates if the details are configured.

Type:

bool

static darwin_details() Tuple | None[source]

Retrieves OS details using the sw_vers command.

Returns:

A tuple containing the source and details dictionary.

Return type:

tuple

static info() Tuple | None[source]
static kind()[source]

Returns the kind of the OS details.

Returns:

The kind of the OS details.

Return type:

str

class smah.settings.system.operating_system.info.LinuxInfo(config_data=None, fetch=False)[source]

Bases: BaseInfo

Represents Linux-specific OS details.

errors

List of errors encountered during initialization.

Type:

list

source

The source of the OS details.

Type:

str

details

The OS details.

Type:

dict

vsn

Version string.

Type:

str

configured

Indicates if the details are configured.

Type:

bool

static info() Tuple | None[source]
static kind()[source]

Returns the kind of the OS details.

Returns:

The kind of the OS details.

Return type:

str

static os_release_details() Tuple | None[source]

Retrieves OS release details from /etc/os-release.

Returns:

A tuple containing the source and details dictionary.

Return type:

tuple

static proc_details() Tuple | None[source]

Retrieves OS details from /proc/version.

Returns:

A tuple containing the source and details dictionary.

Return type:

tuple

static uname_details() Tuple | None[source]

Retrieves OS details using the uname command.

Returns:

A tuple containing the source and details dictionary.

Return type:

tuple

class smah.settings.system.operating_system.info.WindowsInfo(config_data=None, fetch=False)[source]

Bases: BaseInfo

Represents Windows-specific OS details.

errors

List of errors encountered during initialization.

Type:

list

source

The source of the OS details.

Type:

str

details

The OS details.

Type:

dict

vsn

Version string.

Type:

str

configured

Indicates if the details are configured.

Type:

bool

static info() Tuple | None[source]
static kind()[source]

Returns the kind of the OS details.

Returns:

The kind of the OS details.

Return type:

str

static system_info_details() Tuple | None[source]

Retrieves OS details using the systeminfo command.

Returns:

A tuple containing the source and details dictionary.

Return type:

tuple

Modules

base_info

bsd_info

darwin_info

linux_info

windows_info