Config#
- class efiboot.Config(path, timeout, backend, options, entries)#
The efiboot configuration format.
Efiboot configuration typically lives in a TOML file. This class provides several classmethods to load a Config object from such a file:
Config.from_path
: parses a TOML file located at a given path.Config.from_file
: parses a config from a file-like object.Config.from_toml
: parses a config from a TOML string.Config.from_dict
: creates a config from a dict, e.g. the output oftoml.loads
.
See also
The Configuration Format document contains additional details and examples.
- Parameters
path (Optional[Path]) – The path to the config file. This may be None if the config was not parsed from a file.
timeout (Optional[int]) – The boot timeout in seconds. If this is not set, efiboot will not modify the boot timeout. If this is -1, efiboot will clear the boot timeout on the EFI, reverting to the motherboard’s default value.
backend (Optional[str]) – The backend to use. This must be a dotted import path to a Python module providing an efiboot backend. See
efiboot.backends
.options (Dict[str, Any]) – A dictionary of additional backend-specific options.
entries (List[BootEntry]) – The boot entries.
Methods
Create an empty config object.
Create a config object from a dictionary.
Read a config object from a file.
Read a config object from a path.
Parse a config object from a TOML string.
Validate the config.
Attributes