betty.plugin.static module - Betty 0.4.0a3 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.static module

Provide static plugin management.

final class betty.plugin.static.StaticPluginRepository

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

  A repository that is given a static collection of plugins, and exposes those.

  Parameters:

    plugins (`type`[`typing.TypeVar`(`_PluginT`, bound= `betty.plugin.Plugin`)])

  __init__(*plugins: type[betty.plugin.static._PluginT])
    Parameters:

      plugins (`type`[`typing.TypeVar`(`_PluginT`, bound= `betty.plugin.Plugin`)])

  async get(plugin_id: str) → type[betty.plugin.static._PluginT]

    Get a single plugin by its ID.

    Raises:

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

    Parameters:

      plugin_id (`str`)

    Return type:

      `type`[`typing.TypeVar`(`_PluginT`, bound= `betty.plugin.Plugin`)]