Pattern for using python modules as configuration files.
pip3 install modconf
Import module
from modconf import import_conf conf = import_conf('module_name', folder='optional module search path')
conf
is simply the module loaded using __import__
Import class
from modconf import import_class cls = import_class('module_name', 'class_name', args, kwargs, foler='optional module search path')
cls
is a class definition.
import_class
will call cls.prepare(*args, **kwargs)
before returning.