cement.ext.ext_configparser
Cement configparser extension module.
- class cement.ext.ext_configparser.ConfigParserConfigHandler(**kw: Any)[source]
Bases:
ConfigHandler,RawConfigParserThis class is an implementation of the Config interface. It handles configuration file parsing and the like by sub-classing from the standard ConfigParser library. Please see the ConfigParser documentation for full usage of the class.
Additional arguments and keyword arguments are passed directly to RawConfigParser on initialization.
- add_section(section: str) None[source]
Adds a block section to the config.
- Parameters:
section (str) – The section to add.
- get(section: str, key: str, **kwargs: Any) str[source]
Get a config value for a given
section, andkey.
- get_dict() Dict[str, Any][source]
Return a dict of the entire configuration.
- Returns:
A dictionary of the entire config.
- Return type:
- get_section_dict(section: str) Dict[str, Any][source]
Return a dict representation of a section.
- Parameters:
section – The section of the configuration.
- Returns:
Dictionary reprisentation of the config section.
- Return type:
- get_sections() List[str][source]
Return a list of configuration sections.
- Returns:
List of sections
- Return type: