Loader: Loading of task definition files

class invoke.loader.Loader

Abstract class defining how to load a session’s base Collection.


Implementation-specific finder method seeking collection name.

Must return a 4-tuple valid for use by imp.load_module, which is typically a name string followed by the contents of the 3-tuple returned by imp.find_module (file, pathname, description.)

For a sample implementation, see FilesystemLoader.


Load and return collection identified by name.

This method requires a working implementation of find in order to function.

In addition to importing the named module, it will add the module’s parent directory to the front of sys.path to provide normal Python import behavior (i.e. so the loaded module may load local-to-it modules or packages.)

Previous topic

Executor: Task execution machinery

Next topic

parser: Command-line parser

This Page