betty.cli module
Provide the Command Line Interface.
-
class betty.cli.CommandProvider[source]
Bases: object
-
property commands : dict[str, Command]
-
betty.cli.app_command(f)[source]
Decorate a command to receive the currently running betty.app.App as its first argument.
- Parameters:
- f
-
- Return type:
typing.Callable[[typing.ParamSpec(P, bound= None)], None]
-
betty.cli.catch_exceptions()[source]
Catch and log all exceptions.
- Return type:
typing.Iterator[None]
-
betty.cli.global_command(f)[source]
Decorate a command to be global.
- Parameters:
- f
-
- Return type:
typing.Callable[[typing.ParamSpec(P, bound= None)], None]