thoth.common.config package

Submodules

thoth.common.config.base module

A base class for configuration entries.

class thoth.common.config.base.ConfigEntryBase[source]

Bases: object

A base class for configuration entries.

classmethod from_dict(dict_: dict)[source]

Instantiate hardware related information from its dictionary representation.

to_dict(without_none: bool = False) → dict[source]

Convert runtime environment object representation to a dict.

thoth.common.config.hardware_information module

Representation of hardware available with serialization/deserialization methods.

class thoth.common.config.hardware_information.HardwareInformation(cpu_family: int = None, cpu_model: int = None)[source]

Bases: thoth.common.config.base.ConfigEntryBase

Representation for hardware related information.

cpu_family
cpu_model

thoth.common.config.operating_system module

Representation of operating system available with serialization/deserialization methods.

class thoth.common.config.operating_system.OperatingSystem(name: str = None, version: str = None)[source]

Bases: thoth.common.config.base.ConfigEntryBase

Representation for hardware related information.

name
version

thoth.common.config.runtime_environment module

Representation of runtime environment entry collapsing hardware, runtime and other information.

class thoth.common.config.runtime_environment.RuntimeEnvironment(hardware: thoth.common.config.hardware_information.HardwareInformation, operating_system: thoth.common.config.operating_system.OperatingSystem, python_version: str = None, cuda_version: str = None, name: str = None)[source]

Bases: object

An entry collapsing configuration options in the user configuration file.

cuda_version
classmethod from_dict(dict_: dict = None)[source]

Parse one configuration entry from a dictionary.

hardware
classmethod load(content: str = None)[source]

Load runtime environment information from file or from a JSON representation, transparently.

name
operating_system
python_version
to_dict(without_none: bool = False)[source]

Convert runtime environment configuration to a dict representation.

to_string()[source]

Convert runtime environment configuration to a string representation.

Module contents

Representation of configuration entries in Thoth.