qmi.core.config_struct.config_struct_from_dict
- qmi.core.config_struct.config_struct_from_dict(data: dict[str, Any], cls: type[_T]) _T
Convert configuration data from a dictionary to a dataclass instance.
The input data is typically obtained by parsing a JSON file.
- Parameters:
data – Configuration data as a dict instance.
cls – Dataclass type to be used for holding the configuration data.
- Returns:
An instance of the specified dataclass containing the configuration data.
- Raises:
QMI_ConfigurationException – If the configuration data does not match the expected structure.