include - Dynamic Module Importer¶
include library is built to use code from arbitrary sources in your application.
In contrast to
exec and other code execution,
include creates fully featured modules.
This makes code viable for pickling, multiprocessing, IPC and more.
include is straight forward - you only need the top level functions of the module:
import include my_config = include.path('/etc/sysconfig/app_conf.py')
All ugly bits are handled by
include - once a module is imported, it works as normal.
Even in other processes, the import machinery is bootstrapped without manual intervention.
For all supported import methods, check out the public inteface of the