qgis_deployment_toolbelt.scenarios.scenario_reader module¶
Read and validate scenario files.
Author: Julien Moura (https://github.com/guts, Oslandia)
- class qgis_deployment_toolbelt.scenarios.scenario_reader.ScenarioReader(in_yaml: str | Path | BufferedIOBase)¶
Bases:
object
Read and validate scenario files.
- __init__(in_yaml: str | Path | BufferedIOBase)¶
Instanciajeting YAML scenario reader.
- check_yaml_buffer(yaml_buffer: BufferedIOBase) BufferedIOBase ¶
Perform some checks on passed yaml file.
- Parameters:
yaml_buffer (BufferedIOBase) – bytes reader of the yaml file to check
- Raises:
yaml.YAMLError – if YAML is not readable or invalid
Exception – unhandled error
- Returns:
checked bytes object
- Return type:
BufferedIOBase
- check_yaml_file(yaml_path: str | Path) Path ¶
Perform some checks on passed yaml file and load it as Path object.