betty.cli package

Subpackages

Submodules

Module contents

Provide the Command Line Interface.

final class betty.cli.ContextAppObject[source]

Bases: object

The running Betty application and it localizer.

__init__(app: App, localizer: Localizer) None
app: App
localizer: Localizer
betty.cli.ctx_app_object(ctx: Context) ContextAppObject[source]

Get the running application object from a context.

Parameters:

ctx – The context to get the application from. Defaults to the current context.

betty.cli.main() Any[source]

Launch Betty’s Command-Line Interface.

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

async betty.cli.new_main_command(app: App) Command[source]

Create a new Click command for the Betty Command Line Interface.