micropy.config.config_source

Config Abstract.

Classes

ConfigSource([initial_config])

Abstract Base Class for Config Sources.

class micropy.config.config_source.ConfigSource(initial_config={})

Bases: contextlib.AbstractContextManager

Abstract Base Class for Config Sources.

Parameters

initial_config (dict, optional) – Initial config values. Defaults to {}.

property config

Current Config Content.

Return type

dict

abstract property exists

Property to check if source exists.

Return type

bool

abstract prepare()

Method to prepare on enter.

Return type

Any

abstract process()

Read and process config file.

Returns

Config file content

Return type

dict

abstract save(content)

Method to save config.

Return type

Any