config_file#

@author: ☙ Ryan McConnell ❧

class grave_settings.config_file.PassLogFilePath(value)[source]#

Bases: Semantic[str]

Parameters:

value (T) –

val#

Bases: Serializable

to_dict(context, **kwargs)[source]#
Parameters:

context (FormatterContext) –

Return type:

dict

from_dict(state_obj, context, **kwargs)[source]#
Parameters:
class grave_settings.config_file.ConfigFile(file_path, data=None, formatter=None, auto_save=False, read_only=False)[source]#

Bases: Serializable

Parameters:
FORMATTER_STR_DICT = {'json': <grave_settings.formatters.json.JsonFormatter object>, 'toml': <grave_settings.formatters.toml.TomlFormatter object>}#
add_config_dependency(other, relative_path=True)[source]#
Parameters:

other (ConfigFile) –

Parameters:

link (LogFileLink) –

is_loaded()[source]#
backup_settings_file()[source]#
settings_invalidated()[source]#
validate_file_path(path, must_exist=False)[source]#
Parameters:

path (Path) –

save(path=None, formatter=None, force=True, validate_path=True)[source]#
Parameters:
classmethod check_in_serialization_context(context)[source]#

This method typically is called on an instantiated object, so it may not be necessary for it to be a class method.

Parameters:

context (FormatterContext) –

get_serialization_context()[source]#
handle_serialize_IASettings(serializer, obj, **kwargs)[source]#
Parameters:
load(path=None, formatter=None, validate_path=True, semantics=None)[source]#
Parameters:
classmethod check_in_deserialization_context(context)[source]#

This method is typically called on type objects, so it should remain a class method in sub-classes. This is where you can put a reference to NotifyFinalizedMethodName to get a callback

Parameters:

context (FormatterContext) –

get_deserialization_context()[source]#
Parameters:
instantiate_data()[source]#
get_load_data_obj()[source]#
to_dict(*args)[source]#
from_dict(state_obj, *args)[source]#
Parameters:

state_obj (dict) –

classmethod handle_me(ser_type, state_obj, *args, **kwargs)[source]#
Parameters: