()
return plugins
Discover available plugin classes using the 'lightbus_plugins' entrypoint
Discover available plugin classes using the 'lightbus_plugins' entrypoint
Discover available plugin classes using the lightbus_plugins entrypoint
def find_plugins() -> Dict[str, Type[LightbusPlugin]]:
    """Discover available plugin classes using the 'lightbus_plugins' entrypoint
    """
    available_plugin_classes = load_entrypoint_classes(ENTRYPOINT_NAME)
    available_plugin_classes = sorted(available_plugin_classes, key=lambda v: v[-1].priority)

    plugins = OrderedDict()
    for module_name, name, plugin in available_plugin_classes:
        if name in plugins:
            pass
        plugins[name] = plugin

    return plugins
def find_plugins ( ) -> Dict [ str , Type [ LightbusPlugin ] ] : available_plugin_classes = load_entrypoint_classes ( ENTRYPOINT_NAME ) available_plugin_classes = sorted ( available_plugin_classes , key = lambda v : v [ - 1 ] . priority ) plugins = OrderedDict ( ) for module_name , name , plugin in available_plugin_classes : if name in plugins : pass plugins [ name ] = plugin return plugins