default_handlers#
@author: ☙ Ryan McConnell ❧
- grave_settings.default_handlers.force_instantiate(type_obj)[source]#
- Parameters:
type_obj (Type[T]) –
- Return type:
T
- class grave_settings.default_handlers.SerializationHandler(*args, **kwargs)[source]#
Bases:
OrderedHandler
- static handle_method(key, context, **kwargs)[source]#
- Parameters:
key (method) –
context (FormatterContext) –
- static handle_bytes(key, context, **kwargs)[source]#
- Parameters:
key (bytes) –
context (FormatterContext) –
- static handle_partial(key, context, **kwargs)[source]#
- Parameters:
key (partial) –
context (FormatterContext) –
- static handle_Enum(key, context, **kwargs)[source]#
- Parameters:
key (Enum) –
context (FormatterContext) –
- static handle_PreservedReference(key, context, **kwargs)[source]#
- Parameters:
key (PreservedReference) –
context (FormatterContext) –
- static handle_Iterable(key, context, **kwargs)[source]#
- Parameters:
key (Iterable) –
context (FormatterContext) –
- static handle_Mapping(key, context, **kwargs)[source]#
- Parameters:
key (Mapping) –
context (FormatterContext) –
- static handle_type(key, context, **kwargs)[source]#
- Parameters:
key (Type) –
context (FormatterContext) –
- static handle_function_type(key, context, **kwargs)[source]#
- Parameters:
key (function) –
context (FormatterContext) –
- static handle_NoneType(key, context, **kwargs)[source]#
- Parameters:
key (None) –
context (FormatterContext) –
- static handle_serializable(key, context, **kwargs)[source]#
- Parameters:
key (Serializable) –
context (FormatterContext) –
- static handle_datetime(key, context, **kwargs)[source]#
- Parameters:
key (datetime) –
context (FormatterContext) –
- static handle_date(key, context, **kwargs)[source]#
- Parameters:
key (date) –
context (FormatterContext) –
- static handle_timedelta(key, context, **kwargs)[source]#
- Parameters:
key (timedelta) –
context (FormatterContext) –
- static default_handler(key, context, **kwargs)[source]#
- Parameters:
context (FormatterContext) –
- handle(key, context, **kwargs)[source]#
- Parameters:
context (FormatterContext) –
- class grave_settings.default_handlers.DeSerializationHandler(*args, **kwargs)[source]#
Bases:
OrderedHandler
- static handle_Complex(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[method]) –
json_obj (dict) –
context (FormatterContext) –
- static handle_Rational(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[method]) –
json_obj (dict) –
context (FormatterContext) –
- static handle_method(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[method]) –
json_obj (dict) –
context (FormatterContext) –
- static handle_bytes(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- static handle_partial(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[partial]) –
json_obj (dict) –
context (FormatterContext) –
- static handle_Enum(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- static handle_PreservedReference(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[PreservedReference]) –
json_obj (dict) –
context (FormatterContext) –
- static handle_KeySerializableDict(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[KeySerializableDict]) –
json_obj (dict) –
context (FrameStackContext) –
- static handle_tuple(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- static handle_set(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- static handle_type(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- static handle_serializable(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[Serializable]) –
json_obj (dict) –
context (FormatterContext) –
- Return type:
- static handle_datetime(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- Return type:
- static handle_date(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- Return type:
- static handle_timedelta(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
json_obj (dict) –
context (FormatterContext) –
- Return type:
- static default_handler(t_object, json_obj, context, **kwargs)[source]#
- Parameters:
t_object (Type[T]) –
json_obj (dict) –
context (FormatterContext) –
- Return type:
T