/includer

Include and run callables

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Includer

Usage

some_module.py:

def some_func(arg='World'):
    print('Hello {}'.format(arg))

some_else_module.py:

from includer import include

include('some_module.some_func', arg='ZZZ')

IncluderMixin

Mix include method for objects. Behavior like as Configurator.include. See tests for understood it.

This is very usefull for imperative application configuration.

Tests

$ pip install pytest
$ py.test tests -v