class documentation

Abstract class defining how to find/import a session's base `.Collection`. .. versionadded:: 1.0

Method __init__ Set up a new loader with some `.Config`.
Method find Implementation-specific finder method seeking collection ``name``.
Method load Load and return collection module identified by ``name``.
Instance Variable config Undocumented
def __init__(self, config=None): (source)

Set up a new loader with some `.Config`. :param config: An explicit `.Config` to use; it is referenced for loading-related config options. Defaults to an anonymous ``Config()`` if none is given.

def find(self, name): (source)

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`. .. versionadded:: 1.0

def load(self, name=None): (source)

Load and return collection module 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.) :returns: Two-tuple of ``(module, directory)`` where ``module`` is the collection-containing Python module object, and ``directory`` is the string path to the directory the module was found in. .. versionadded:: 1.0

Undocumented