Directives

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

Represents a directive.

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

An argument provider instance.

kwargs: dict[str, Any]

Arguments to pass to the argument provider

name: str

The name of the provider.

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

Create a directive from its database representation

to_db(dumps)[source]

Convert this directive to its database representation

argument_providers: list[ArgumentProvider]

The list of argument providers that can be used with this directive.

implementation: str | None

The dotted name of the directive’s implementation.

location: Location | None = None

The location of the directive’s implementation, if known

name: str

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