Config Module

squishbox.config.load_config(name, default_cfg=None)[source]

Load configuration data

Loads config from YAML files. Creates a default config if target doesn’t exist. Returns config as a dict after performing Path conversion on items with keys ending in _path.

Parameters:
  • name (str | Path) – config file relative to CONFIG_PATH or absolute

  • default_cfg (dict) – overrides for initial config values

Returns:

config data

Return type:

dict

squishbox.config.save_state(name, cfg)[source]

Write config data back to a file

Parameters:
  • name (str | Path) – config file relative to CONFIG_PATH or absolute

  • cfg (dict) – the current config state