Skip to content

xtr_maker.bundle

The xtr-dependency-injection bundle for xtr-maker.

MakerBundle

Bases: Bundle[MakerConfig]

Registers the generator, and the makers whose library's bundle is active.

load_extension

load_extension(config: MakerConfig, services: ServiceConfigurator, builder: ContainerBuilder) -> None

Register the generator's services, then the command module of each maker in reach.

The generator is scoped: a maker run is one unit of work, which queues its own files, and a run that fails leaves nothing queued for the next.

MakerConfig dataclass

MakerConfig(root_package: str | None = None, final_classes: bool = True)

Where the makers write, and how the classes they write are declared.

Attributes:

  • root_package (str | None) –

    The dotted application package the makers write into. None takes the kernel's package, kernel.package; set it only to write into another one.

  • final_classes (bool) –

    Whether generated classes are marked @final.

Raises: