betty.cli package - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.cli package

## Subpackages

- betty.cli.commands package
  - Submodules
    - betty.cli.commands.clear_caches module
      - `ClearCaches`
        - `ClearCaches.__init__()`
        - `ClearCaches.click_command()`
        - `ClearCaches.new_for_app()`
    - betty.cli.commands.config module
      - `Config`
        - `Config.__init__()`
        - `Config.click_command()`
        - `Config.new_for_app()`
    - betty.cli.commands.demo module
      - `Demo`
        - `Demo.__init__()`
        - `Demo.click_command()`
        - `Demo.new_for_app()`
    - betty.cli.commands.dev_new_translation module
      - `DevNewTranslation`
        - `DevNewTranslation.__init__()`
        - `DevNewTranslation.click_command()`
        - `DevNewTranslation.new_for_app()`
    - betty.cli.commands.dev_update_translations module
      - `DevUpdateTranslations`
        - `DevUpdateTranslations.__init__()`
        - `DevUpdateTranslations.click_command()`
        - `DevUpdateTranslations.new_for_app()`
    - betty.cli.commands.docs module
      - `Docs`
        - `Docs.__init__()`
        - `Docs.click_command()`
        - `Docs.new_for_app()`
    - betty.cli.commands.extension_new_translation module
      - `ExtensionNewTranslation`
        - `ExtensionNewTranslation.__init__()`
        - `ExtensionNewTranslation.click_command()`
        - `ExtensionNewTranslation.new_for_app()`
    - betty.cli.commands.extension_update_translations module
      - `ExtensionUpdateTranslations`
        - `ExtensionUpdateTranslations.__init__()`
        - `ExtensionUpdateTranslations.click_command()`
        - `ExtensionUpdateTranslations.new_for_app()`
    - betty.cli.commands.generate module
      - `Generate`
        - `Generate.__init__()`
        - `Generate.click_command()`
        - `Generate.new_for_app()`
    - betty.cli.commands.new module
      - `New`
        - `New.__init__()`
        - `New.click_command()`
        - `New.new_for_app()`
    - betty.cli.commands.new_translation module
      - `NewTranslation`
        - `NewTranslation.__init__()`
        - `NewTranslation.click_command()`
        - `NewTranslation.new_for_app()`
    - betty.cli.commands.serve module
      - `Serve`
        - `Serve.__init__()`
        - `Serve.click_command()`
        - `Serve.new_for_app()`
    - betty.cli.commands.update_translations module
      - `UpdateTranslations`
        - `UpdateTranslations.__init__()`
        - `UpdateTranslations.click_command()`
        - `UpdateTranslations.new_for_app()`
  - Module contents
    - `COMMAND_REPOSITORY`
    - `Command`
      - `Command.click_command()`
    - `command()`
    - `parameter_callback()`
    - `project_option()`

## Submodules

- betty.cli.error module
  - `user_facing_error_to_bad_parameter()`

## Module contents

Provide the Command Line Interface.

final class betty.cli.ContextAppObject

  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

  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

  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

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