cloudendure.config

Define the CloudEndure Config related logic.

CloudEndureConfig

CloudEndureConfig(self, username: 'str' = '', password: 'str' = '', token: 'str' = '', *args, **kwargs) -> 'None'

Define the CloudEndure Config object.

BASE_CONFIG

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

merge_config_dicts

CloudEndureConfig.merge_config_dicts(self, values: 'List[Any]') -> 'Dict[str, str]'

Merge a list of configuration dictionaries.

read_yaml_config

CloudEndureConfig.read_yaml_config(self) -> 'Dict[str, Any]'

Read the CloudEndure YAML configuration file.

write_yaml_config

CloudEndureConfig.write_yaml_config(self, config: 'Dict[str, Any]') -> 'bool'

Write to the CloudEndure YAML configuration file.

update_yaml_config

CloudEndureConfig.update_yaml_config(self, kwargs: 'Dict[str, Any]') -> 'bool'

Update the YAML configuration file.

get_env_vars

CloudEndureConfig.get_env_vars(self, prefix: 'str' = 'cloudendure') -> 'Dict[str, any]'

Get all environment variables starting with CLOUDENDURE_.

update_config

CloudEndureConfig.update_config(self) -> 'None'

Update the configuration.

update_token

CloudEndureConfig.update_token(self, token: 'str') -> 'bool'

Update the CloudEndure token.

Returns: bool: Whether or not the operation was successful.

get_var

CloudEndureConfig.get_var(self, var: 'str') -> 'str'

Get the specified environment or config variable.

Returns: str: The variable to be used for the provided configuration env var.