gaps.config.Handler#

class Handler[source]#

Bases: ABC

ABC for configuration file handler.

Methods

dump(config, stream)

Write the config to a stream (file).

dumps(config)

Convert the config to a string.

load(file_name)

Load the file contents.

loads(config_str)

Parse the string into a config dictionary.

write(file_name, data)

Write the data to a file.

Attributes

FILE_EXTENSION

Enum name to use

classmethod load(file_name)[source]#

Load the file contents.

classmethod write(file_name, data)[source]#

Write the data to a file.

abstract classmethod dump(config, stream)[source]#

Write the config to a stream (file).

abstract classmethod dumps(config)[source]#

Convert the config to a string.

abstract classmethod loads(config_str)[source]#

Parse the string into a config dictionary.

abstract property FILE_EXTENSION#

Enum name to use

Type:

str