Skip to content
/ modconf Public

Pattern for using python modules as configuration files

License

Notifications You must be signed in to change notification settings

chuck1/modconf

Repository files navigation

modconf

https://travis-ci.org/chuck1/modconf.svg?branch=master Documentation Status

Pattern for using python modules as configuration files.

Install

pip3 install modconf

Example

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.

About

Pattern for using python modules as configuration files

Resources

License

Stars

Watchers

Forks

Packages

No packages published