Mix-in that implements IConfigurationContext

Subclasses provide a package attribute and a basepath attribute. If the base path is not None, relative paths are converted to absolute paths using the the base path. If the package is not none, relative imports are performed relative to the package.

In general, the basepath and package attributes should be consistent. When a package is provided, the base path should be set to the path of the package directory.

Subclasses also provide an actions attribute, which is a list of actions, an includepath attribute, and an info attribute.

The include path is appended to each action and is used when resolving conflicts among actions. Normally, only the a ConfigurationMachine provides the actions attribute. Decorators simply use the actions of the context they decorate. The includepath attribute is a tuple of names. Each name is typically the name of an included configuration file.

The info attribute contains descriptive information helpful when reporting errors. If not set, it defaults to an empty string.

The actions attribute is a sequence of tuples with items:

  • discriminator, a value that identifies the action. Two actions that have the same (non None) discriminator conflict.
  • an object that is called to execute the action,
  • positional arguments for the action
  • keyword arguments for the action
  • a tuple of include file names (defaults to ())
  • an object that has descriptive information about the action (defaults to '')

For brevity, trailing items after the callable in the tuples are ommitted if they are empty.

Base classes

Implemented Interfaces

There are no implemented interfaces.


There are no attributes in this class.


Known Subclasses