yacmmal.load package
Submodules
yacmmal.load.base module
- class yacmmal.load.base.AbstractLoader[source]
Bases:
abc.ABC
Abstract class for config loaders.
- abstract add_path(path: str, name: str, dclass: Type[pydantic.main.BaseModel]) yacmmal.load.base.AbstractLoader [source]
- abstract extract() yacmmal.types.config.Config [source]
- class yacmmal.load.base.Loader(base_path: str)[source]
Bases:
yacmmal.load.base.AbstractLoader
Base class for loading config files.
- add_path(path: str, name: Union[str, yacmmal.types.config.ConfigAttrs], dclass: Type[pydantic.main.BaseModel]) yacmmal.load.base.Loader [source]
Adds a path to the loader.
- Parameters
path (str) – Path to the config file.
name (Union[str, ConfigAttrs]) – Name of the config file.
dclass (Type[BaseModel]) – The dataclass to use.
- Returns
The current loader.
- Return type
- extract() yacmmal.types.config.Config [source]
Extracts the config object.
- Returns
The config object.
- Return type
yacmmal.load.conf module
- class yacmmal.load.conf.CONFLoader(base_path: str)[source]
Bases:
yacmmal.load.base.Loader
Loader for CONF files.
- base_path
The base path of the config files.
- Type
str
- class yacmmal.load.conf.INILoader(base_path: str)[source]
Bases:
yacmmal.load.conf.CONFLoader
Loader for INI files.
- base_path
The base path of the config files.
- Type
str
yacmmal.load.json module
- class yacmmal.load.json.JSONLoader(base_path: str)[source]
Bases:
yacmmal.load.base.Loader
Loader for JSON files.
- base_path
The base path of the config files.
- Type
str
yacmmal.load.toml module
- class yacmmal.load.toml.TOMLLoader(base_path: str)[source]
Bases:
yacmmal.load.base.Loader
Loader for TOML files.
- base_path
The base path of the config files.
- Type
str
yacmmal.load.yaml module
- class yacmmal.load.yaml.YAMLLoader(base_path: str = './')[source]
Bases:
yacmmal.load.base.Loader
Loader for YAML files.
- base_path
The base path to the YAML files.
- Type
str