enconsole.conso package#
Subpackages#
Submodules#
enconsole.conso.config module#
- class enconsole.conso.config.ConsoConfig(sargs: dict[str, Any] | None = None, files: str | Path | list[str | Path] | list[str] | list[Path] | tuple[str | Path, ...] | set[str] | None = None, cargs: dict[str, Any] | None = None)[source]#
Bases:
ConfigContain the configurations from the arguments and files.
- Parameters:
sargs – Additional arguments on the command line.
files – Complete or relative path to config files.
cargs – Configuration arguments in dictionary form, which will override contents from the config files.
- property params: ConsoParams#
Return the Pydantic model containing the configuration.
Warning
This method completely overrides the parent but is based on that code, would be unfortunate if upstream changes meant this breaks or breaks something else.
- Returns:
Pydantic model containing the configuration.
enconsole.conso.conso module#
- class enconsole.conso.conso.Conso(config: ConsoConfig)[source]#
Bases:
objectInteract with supported devices to ensure desired state.
- Parameters:
config – Primary class instance for configuration.
- property config: ConsoConfig#
Return the Config instance containing the configuration.
- Returns:
Config instance containing the configuration.
- property params: ConsoParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property console: bool#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property debug: bool#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property dryrun: bool#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
enconsole.conso.models module#
Module contents#
- class enconsole.conso.Conso(config: ConsoConfig)[source]#
Bases:
objectInteract with supported devices to ensure desired state.
- Parameters:
config – Primary class instance for configuration.
- property config: ConsoConfig#
Return the Config instance containing the configuration.
- Returns:
Config instance containing the configuration.
- property params: ConsoParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property console: bool#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property debug: bool#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property dryrun: bool#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- class enconsole.conso.ConsoConfig(sargs: dict[str, Any] | None = None, files: str | Path | list[str | Path] | list[str] | list[Path] | tuple[str | Path, ...] | set[str] | None = None, cargs: dict[str, Any] | None = None)[source]#
Bases:
ConfigContain the configurations from the arguments and files.
- Parameters:
sargs – Additional arguments on the command line.
files – Complete or relative path to config files.
cargs – Configuration arguments in dictionary form, which will override contents from the config files.
- property params: ConsoParams#
Return the Pydantic model containing the configuration.
Warning
This method completely overrides the parent but is based on that code, would be unfortunate if upstream changes meant this breaks or breaks something else.
- Returns:
Pydantic model containing the configuration.