conversion_manager#

@author: ☙ Ryan McConnell ❧

exception grave_settings.conversion_manager.ConversionError[source]#

Bases: Exception

grave_settings.conversion_manager.basic_converter(json_obj, mapping)[source]#
Parameters:
  • json_obj (dict) –

  • mapping (dict) –

Return type:

dict

class grave_settings.conversion_manager.ConversionManager[source]#

Bases: object

converters: dict[tuple[str, str], tuple[Callable, str]]#
converted#
classmethod get_version_info_from_class(clt)[source]#
Parameters:

clt (Type) –

classmethod get_version_object(t_obj)[source]#
Parameters:

t_obj (Type | object) –

add_converter(target_ver, target_class, conversion_func, out_ver)[source]#
Parameters:

target_class (Type | str) –

try_convert(state_obj, class_str, ver, target_ver)[source]#
Parameters:
  • state_obj (dict) –

  • class_str (str) –

  • ver (str) –

  • target_ver (str) –

update_to_current(json_obj, load_type, version_info)[source]#
Parameters:

load_type (Callable[[str], Type]) –

Return type:

dict