githubapp.config
Config module
This module handles loading configuration values from a YAML file and provides access to those values via the ConfigValue class.
Module Contents
Classes
The configuration loaded from the config file |
Data
API
- githubapp.config.AnyBasic
None
- githubapp.config.Config
‘ConfigValue(…)’
- exception githubapp.config.ConfigError
Bases:
AttributeErrorException raised for errors in the configuration.
Attributes: message - explanation of the error
Initialization
Initialize self. See help(type(self)) for accurate signature.
- class githubapp.config.ConfigValue(value: githubapp.config.AnyBasic = None)
The configuration loaded from the config file
Initialization
- static call_if(config_name: str, value: githubapp.config.AnyBasic = NotSet, return_on_not_call: githubapp.config.AnyBasic = None) collections.abc.Callable[[collections.abc.Callable], collections.abc.Callable]
Decorator to configure a method to be called on if the config is true or is == value
:param config_name: The configuration name :param value: Tha value to compare to the config, default: bool value for the config value :param return_on_not_call: Default value to return when the method is not called, default: None
- create_config(name: str, *, default: githubapp.config.AnyBasic = None, **values: githubapp.config.AnyBasic) githubapp.config.ConfigValue
Create a configuration value and nested values.
Args: name (str): The name of the configuration value default: The default value. If set, values cannot be provided values (dict): Nested configuration values
Returns: ConfigValue: The created configuration value
- load_config_from_file(filename: str, repository: github.Repository.Repository) None
Load the config from a file
- set_values(data: dict[str, githubapp.config.AnyBasic]) None
Set the attributes from a data dict
- githubapp.config.ConfigValueType
‘TypeVar(…)’