Roles

class esbonio.sphinx_agent.types.Role(name, implementation, location=None, target_providers=<factory>)[source]

Represents a role.

class TargetProvider(name, kwargs=<factory>)[source]

A target provider instance.

kwargs: dict[str, Any]

Arguments to pass to the target provider.

name: str

The name of the provider.

classmethod from_db(load_as, name, implementation, location, providers)[source]

Create a role from its database representation.

to_db(dumps)[source]

Convert this role to its database representation.

implementation: str | None

The dotted name of the role’s implementation.

location: Location | None = None

The location of the role’s implementation, if known.

name: str

The name of the role, as the user would type in an rst file.

target_providers: list[TargetProvider]

The list of target providers that can be used with this role.