acquire.acquire.uploaders.plugin_registry¶
Module Contents¶
Classes¶
Maintains a collection of plugins. |
Attributes¶
An PluginRegistry instance that registers |
- acquire.acquire.uploaders.plugin_registry.T¶
- acquire.acquire.uploaders.plugin_registry.log¶
- class acquire.acquire.uploaders.plugin_registry.PluginRegistry(name: str, plugins: collections.abc.Iterator[tuple[str, T]] | None = None)¶
Bases:
Generic[T]Maintains a collection of plugins.
Includes functionality to load plugins from classes defined in entrypoints.
- plugins: dict[str, T]¶
- register(name: str, plugin: T) None¶
Registers a plugin to the plugins dictionary.
- Parameters:
name – The key of the dictionary.
plugin – The plugin class to register.
- remove(name: str) None¶
Removes a plugin from the plugins dictionary.
- Parameters:
name – The key to remove.
- items() collections.abc.ItemsView[str, T]¶
Returns all the items inside the
pluginsdictionary
- get(name: str) T¶
- load_entrypoint_plugins(name: str) None¶
Loads all classes defined in the entrypoints that use the specified
name.Loads the class loaded from the entrypoint with the form:
<name>=<path>:<class>as <name> <loaded class>- Parameters:
name – The entrypoint to search for.
- acquire.acquire.uploaders.plugin_registry.UploaderRegistry¶
An PluginRegistry instance that registers
UploaderPluginplugins