calliope.config¶
Classes¶
Helper to read configuration values from well-known config file. |
Module Contents¶
- class calliope.config.Configuration¶
Helper to read configuration values from well-known config file.
The config file location is determined by the
XDG_CONFIG_HOMEenvironment variable, usually resolving to$HOME/.local/calliope/calliope.conf.- parser¶
- get(section, name)¶
Read a single config value.
Config key names should be lowercase and use underscore (
_) to separate words. For backwards compatibility reasons, if a keyfoo_baris not found in the config,foo-barwill also be checked.- Parameters:
section (str)
name (str)
- Return type:
any
- get_section(section)¶
Return all key/value pairs defined in
section.Any hyphens (
-) in key names will be converted to underscores (_).- Parameters:
section (str)
- Return type:
Dict[str, any]