hook.runner#

class immp.hook.runner.RunnerHook(name, config, host)#

Bases: ResourceHook

Virtual hook that handles reading and writing of config from/to a file.

writeable#

True if the file will be updated on exit, or False if being used read-only.

Type:

bool

schema = None#
load(base, path, writeable)#

Initialise the runner with a full config and the file path.

Parameters:
  • base (dict) – Parsed config file content, excluding object components.

  • path (str) – Target config file location.

  • writeable (bool) – True if changes to the live config may be written back to the file.

write_config()#

Write the live config out to the target config file, if writing is enabled.

on_config_change(source)#

Handle a configuration change from another plug or hook.

Parameters:

source (.Configurable) – Source plug or hook that triggered the event.