Config Writers

Config writers are what ComprehensiveConfig uses to load and dump configuration objects. These are a basic interface that can be extended and used for any format!

Module

abstract class comprehensiveconfig.configio.ConfigurationWriter
abstractmethod classmethod dumps(cls, node: spec.AnyConfigField) str
Parameters:

node (AnyConfigField) – The configuration object we are writing.

Dumps a string output from a given config

abstractmethod classmethod dump(cls, file, node: spec.AnyConfigField)
Parameters:
  • file – The file name or object we are writing to.

  • node (AnyConfigField) – The configuration object we are writing.

Dumps a to a configuration section to a given file

abstractmethod classmethod loads(cls, data: str) dict[str, Any]
Parameters:

data (str) – The configuration object we are writing.

Load the given configuration string as

abstractmethod classmethod load(cls, file) dict[str, Any]
Parameters:

file – The file name or object we are writing to.

Load a given file and create a configuration object