default_handlers#

@author: ☙ Ryan McConnell ❧

grave_settings.default_handlers.force_instantiate(type_obj)[source]#
Parameters:

type_obj (Type[T]) –

Return type:

T

exception grave_settings.default_handlers.NotSerializableException[source]#

Bases: Exception

class grave_settings.default_handlers.SerializationHandler(*args, **kwargs)[source]#

Bases: OrderedHandler

init_handler()[source]#
static handle_path(key, *args, **kwargs)[source]#
Parameters:

key (Path) –

static handle_Complex(key, *args, **kwargs)[source]#
Parameters:

key (Complex) –

static handle_Rational(key, *args, **kwargs)[source]#
Parameters:

key (Rational) –

static handle_method(key, context, **kwargs)[source]#
Parameters:
static omit(self)[source]#
static handle_bytes(key, context, **kwargs)[source]#
Parameters:
static handle_partial(key, context, **kwargs)[source]#
Parameters:
static handle_Enum(key, context, **kwargs)[source]#
Parameters:
static handle_PreservedReference(key, context, **kwargs)[source]#
Parameters:
static handle_Iterable(key, context, **kwargs)[source]#
Parameters:
static handle_Mapping(key, context, **kwargs)[source]#
Parameters:
static handle_type(key, context, **kwargs)[source]#
Parameters:
static handle_function_type(key, context, **kwargs)[source]#
Parameters:
static handle_NoneType(key, context, **kwargs)[source]#
Parameters:
static handle_serializable(key, context, **kwargs)[source]#
Parameters:
static handle_datetime(key, context, **kwargs)[source]#
Parameters:
static handle_date(key, context, **kwargs)[source]#
Parameters:
static handle_timedelta(key, context, **kwargs)[source]#
Parameters:
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

init_handler()[source]#
static handle_path(t_object, json_obj, *args, **kwargs)[source]#
Parameters:
  • t_object (Path) –

  • json_obj (dict) –

static handle_Complex(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_Rational(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_method(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_bytes(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_partial(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_Enum(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_NoneType(t_object, *args, **kwargs)[source]#
Parameters:

t_object (Type[None]) –

static handle_PreservedReference(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_KeySerializableDict(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_tuple(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_set(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_type(t_object, json_obj, context, **kwargs)[source]#
Parameters:
static handle_serializable(t_object, json_obj, context, **kwargs)[source]#
Parameters:
Return type:

Serializable

static handle_datetime(t_object, json_obj, context, **kwargs)[source]#
Parameters:
Return type:

datetime

static handle_date(t_object, json_obj, context, **kwargs)[source]#
Parameters:
Return type:

date

static handle_timedelta(t_object, json_obj, context, **kwargs)[source]#
Parameters:
Return type:

timedelta

static default_handler(t_object, json_obj, context, **kwargs)[source]#
Parameters:
Return type:

T

add_handlers_by_type_hints(*callables)[source]#