preheat_open.query.build_instance_from_dict
- preheat_open.query.build_instance_from_dict(cls, data, remove_keys=True)
Builds an instance of a dataclass from a dictionary and returns the instance and the remaining keys.
- Parameters:
cls (Type[T]) – The class to build an instance of.
data (dict) – The dictionary to build the instance from.
remove_keys (bool, optional) – Whether to remove the keys used to build the instance from the dictionary.
- Returns:
A tuple containing the instance and the remaining keys.
- Return type:
tuple[T, dict]