from_file#
method
- classmethod YAMLMixin.from_file(filename: str | Path) PyroLabConfiguration[source]#
Loads a configuration from a YAML file.
Warning
The YAML
loadfunction can run arbitrary code on your machine. Only load trusted or untampered files! If in doubt, examine the file first. It’s a short text file, and should not be hard to vet.- Parameters:
- filenamestr, Path
The filename of the YAML configuration file to load.
- Returns:
- PyroLabConfiguration
The configuration object.
- Raises:
- FileNotFoundError
If the file does not exist.