exhibition.config module

class exhibition.config.Config(data=None, parent=None, node=None)[source]

Bases: object

Configuration object that implements a dict-like interface

If a key cannot be found in this instance, the parent Config will be searched (and its parent, etc.)

Parameters
  • data – Can be one of a string, a file-like object, a dict-like object, or None. The first two will be assumed as YAML

  • parent – Parent Config or None if this is the root configuration object

  • node – The node that this object to bound to, or None if it is the root configuration object

copy()[source]
classmethod from_path(path)[source]

Load YAML data from a file

get(key, default=None)[source]
get_name()[source]
items()[source]
keys()[source]
load(data)[source]

Load data into configutation object

Parameters

data

If a string or file-like object, data is parsed as if it were YAML data. If a dict-like object, data is added to the internal dictionary.

Otherwise an AssertionError exception is raised

update(*args, **kwargs)[source]
values()[source]