Config

class lsst.daf.butler.Config(other=None)

Bases: lsst.daf.butler.core.config._ConfigBase

Implements a datatype that is used by Butler for configuration parameters.

It is essentially a dict with key/value pairs, including nested dicts (as values). In fact, it can be initialized with a dict. The only caveat is that keys may not contain dots (.). This is explained next:

Config extends the dict api so that hierarchical values may be accessed with dot-delimited notation. That is, foo.getValue("a.b.c") is the same as foo["a"]["b"]["c"] is the same as foo["a.b.c"], and either of these syntaxes may be used.

Storage formats supported:

  • yaml: read and write is supported.
Parameters:
other : str or Config or dict

Other source of configuration, can be:

  • (str) Treated as a path to a config file on disk. Must end with “.yaml”.
  • (Config) Copies the other Config’s values into this one.
  • (dict) Copies the values from the dict into this Config.

If None is provided an empty Config will be created.