def load(kind=None):
    """Returns an Index instance according to the configuration."""
    cfg = config.load()
    if not kind:
        kind = cfg.search_backend.lower()
    if kind == 'sqlalchemy':
        from . import db
        return db.SQLAlchemyIndex()
    try:
        module = importlib.import_module(kind)
    except ImportError:
        pass
    else:
        return module.Index()
    raise NotImplementedError('Unknown index type {0!r}'.format(kind))
Returns an Index instance according to the configuration.
docker_registry/lib/index/__init__.py