def __init__(self, group, name=None):… def all_plugins(self, filter=None): if filter: for i in pkg_resources.iter_entry_points(self._group, self._name): if filter(i): yield i.load() else: … def plugin(self, prj, name): return pkg_resources.load_entry_point(prj, self._group, name)