Detailed Configuration

Detailed configuration for IceProd

class iceprod.server.config.IceProdConfig(filename=None, defaults=True, validate=True, override=None, save=True)[source]

IceProd configuration.

The main iceprod configuration. Designed to be modified in-program, not worrying about hand-editing. Currently uses a json file as backing.

Use just like a dictionary. Note that load() and save() are called automatically, but are available for manual calling.

Note that this class is not thread-safe.

Parameters:
  • filename – filename for config file (optional)

  • defaults – use default values (optional: default True)

  • validate – turn validation on/off (optional: default True)

  • override – override list of key=value strings

  • save – enable saving to file (optional: default True)

fill_defaults()[source]
apply_overrides(overrides)[source]
do_validate()[source]
load()[source]

Load config from file, overwriting current contents.

load_string(text)[source]

Load a config from a string, saving to file.

save_to_string()[source]
save()[source]

Save config from file.