get_plugin_from_registry

glotaran.plugin_system.base_registry.get_plugin_from_registry(plugin_register_key: str, plugin_registry: MutableMapping[str, _PluginType], not_found_error_message: str) _PluginType[source]

Retrieve a plugin with name plugin_register_key is registered in a given registry.

Parameters:
  • plugin_register_key (str) – Name of the plugin under which it is registered.

  • plugin_registry (MutableMapping[str, _PluginType]) – Registry to search in.

  • not_found_error_message (str) – Error message to be shown if the plugin wasn’t found.

Returns:

Plugin from the plugin Registry.

Return type:

_PluginType

Raises:

ValueError – If there was no plugin registered under the name plugin_register_key.