betty.cli module¶
Provide the Command Line Interface.
- betty.cli.app_command(f: Callable[[Concatenate[betty.app.App, P]], Awaitable[None]]) Callable[[P], None] [source]¶
Decorate a command to receive the currently running
betty.app.App
as its first argument.- Parameters:
f (
typing.Callable
[[typing.Concatenate
[betty.app.App
,typing.ParamSpec
(P
, bound=None
)]],typing.Awaitable
[None
]])- Return type:
typing.Callable
[[typing.ParamSpec
(P
, bound=None
)],None
]
- betty.cli.global_command(f: Callable[[P], Awaitable[None]]) Callable[[P], None] [source]¶
Decorate a command to be global.
- Parameters:
f (
typing.Callable
[[typing.ParamSpec
(P
, bound=None
)],typing.Awaitable
[None
]])- Return type:
typing.Callable
[[typing.ParamSpec
(P
, bound=None
)],None
]