awsc.config.config.Config
- class awsc.config.config.Config(path=None)
Configuration parser and holder.
- Attributes:
- version_updatersdict
A numbered dict of update functions for incrementally upgrading an outdated configuration file.
- pathpathlib.Path
The configuration parent path, where all configuration data is stored.
- config_pathpathlib.Path
The path to the configuration yaml file.
- keystoreawsc.config.storage.Keystore
The key storage holder instance.
- schemeawsc.config.scheme.Scheme
The color scheme holder instance.
- configdict
The loaded configuration.
Methods
add_or_edit_context(name, acctid, access, secret)Upserts a context into the configuration.
add_or_edit_role_context(name, acctid, ...)Upserts a context into the configuration.
create_default_config()Generates first time default configuration.
delete_context(name)Deletes a context from the configuration.
initialize()Late initializer for the Config object.
parse_config()Parses the configuration file specified in config_path and replaces the currently loaded config with its contents.
update_version()Main configuration update sequence.
write_config()Immediately writes the configuration to the configuration file in config_path.
- __init__(path=None)
Initializes a Config object.
- Parameters:
- pathstr
The configuration parent path, if not default. Defaults to ~/.config/awsc.
Methods
__init__([path])Initializes a Config object.
add_or_edit_context(name, acctid, access, secret)Upserts a context into the configuration.
add_or_edit_role_context(name, acctid, ...)Upserts a context into the configuration.
create_default_config()Generates first time default configuration.
delete_context(name)Deletes a context from the configuration.
initialize()Late initializer for the Config object.
parse_config()Parses the configuration file specified in config_path and replaces the currently loaded config with its contents.
update_version()Main configuration update sequence.
write_config()Immediately writes the configuration to the configuration file in config_path.