betty.plugin.proxy module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.plugin.proxy module

Provide tools for proxying plugin management to other tools.

final class betty.plugin.proxy.ProxyPluginRepository

  Bases: `PluginRepository`[`_PluginT`], `Generic`[`_PluginT`]

  Expose multiple other plugin repositories as one unified repository.

  __init__(*upstreams: PluginRepository[_PluginT], factory: Factory | None = None)
  async get(plugin_id: str) → type[_PluginT]

    Get a single plugin by its ID.

    Raises:

      PluginNotFound – if no plugin can be found for the given ID.

  async new_target(cls: type[_T] | str) → _T | _PluginT

    Create a new instance.

    Raises:

      FactoryError – raised when `cls` could not be instantiated.