IReconfigurable

An interface used to set configuration parameters to an object.

Description

The IReconfigurable interface is used to set configuration parameters to an object.

Important points:

  • It is similar to IConfigurable interface, but emphasises the fact that the configure() method can be called more than once to change an object configuration in runtime.

Implements: IConfigurable

Examples

class MyClass(IReconfigurable):
   _myParam = "default args"

 # Implement configure
   def configure(self, config):
       self._myParam = config.get_as_string_with_default("options.param", myParam)

See also