xtr_console.bundle ¶
The xtr-console bundle for xtr-dependency-injection.
ConsoleBundle ¶
Bases: Bundle[ConsoleConfig]
Assembles an :class:Application from the container and every declared command.
Start with an empty per-kernel :class:CommandsLocator.
ConsoleConfig
dataclass
¶
ConsoleConfig(name: str | None = None, version: str | None = None, description: str | None = None, catch_exceptions: bool = True)
Values the :class:Application factory reads from the container.
Attributes:
-
name(str | None) –The application's name. When
None,kernel.nameis used. -
version(str | None) –The version displayed in the help header and by
--version.Nonedisables that option. -
description(str | None) –One-line description shown in the help header.
-
catch_exceptions(bool) –Report an exception escaping a command and exit :attr:
~xtr_console.ExitCode.FAILUREinstead of propagating.
console
async
¶
Run application on the running event loop; the entry passed to kernel.run.