Example #1
0
File: main.py Project: jad-b/garden
def load_tools():
    """Load Garden interfaces/libraries."""
    tools = {}
    logger.debug('Loading interfaces')
    for ep in iter_entry_points(EP_TOOLS):
        logger.debug('\t%s', ep)
        tools[ep.name] = ep.load()
    return tools
Example #2
0
File: main.py Project: jad-b/garden
def load_repos():
    """Load plugins registered under the Garden entrypoint."""
    registry = {}
    for func in EP_FUNCS:
        ep_group = '.'.join((ENTRYPOINT, func))
        logger.debug('Loading entrypoints for %s', ep_group)
        for ep in iter_entry_points(ep_group):
            logger.debug('Loaded entrypoint: %s', ep)
            registry[func] = {ep.name: ep}
    return registry