Skip to content

API

A Pyrig plugin for projects that create Pyrig plugins.

rig

Pyrig integration for the plugin.

tools

Tool overrides for Pyrig plugin projects.

pyrigger

Pyrigger override that declares pyrig as a runtime dependency.

Pyrigger

Bases: Pyrigger

Extend Pyrig's CLI wrapper for projects that are themselves Pyrig plugins.

runtime_dependency
runtime_dependency() -> str

Return pyrig as the runtime dependency.

Pyrig plugins must declare Pyrig as a runtime dependency so that Pyrig's cross-package plugin discovery can find their implementations.

This overrides the base implementation, which returns pyrig-runtime for non-plugin projects. Because pyrig itself depends on pyrig-runtime, plugin projects only need to declare pyrig.

Returns:

Type Description
str

The name of the runtime dependency, which is pyrig.

Source code in src/pyrig_plugin/rig/tools/pyrigger.py
def runtime_dependency(self) -> str:
    """Return pyrig as the runtime dependency.

    Pyrig plugins must declare Pyrig as a runtime dependency so that
    Pyrig's cross-package plugin discovery can find their implementations.

    This overrides the base implementation, which returns `pyrig-runtime`
    for non-plugin projects. Because `pyrig` itself depends on
    `pyrig-runtime`, plugin projects only need to declare `pyrig`.

    Returns:
        The name of the runtime dependency, which is `pyrig`.
    """
    return self.name()