betty.console package

Submodules

Module contents

The Betty console.

final class betty.console.SystemExitCode

Bases: IntEnum

The exit codes used by the console.

ERROR_COMMAND_RUNTIME = 3
ERROR_CONSOLE_USAGE = 2
ERROR_UNEXPECTED = 4
OK = 0
USER_QUIT = 1
__new__(value)
async betty.console.call_command_func(command_func: CommandFunction, namespace: Namespace) None

Call a command function.

async betty.console.main(app: App, args: Sequence[str]) None

Launch Betty’s console.

Raises:

SystemExit

betty.console.main_standalone() None

Launch Betty’s console.

This is a stand-alone entry point that will manage an event loop and Betty application.

Raises:

SystemExit