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

# betty.extension.demo package

## Module contents

Provide demonstration site functionality.

final class betty.extension.demo.Demo

  Bases: `Extension`

  Provide demonstration site functionality.

  classmethod depends_on() → set[MachineName]

    The extensions this one depends on, and comes after.

  classmethod plugin_id() → MachineName

    Get the plugin ID.

    IDs are unique per plugin type:

    - A plugin repository MUST at most have a single plugin for any ID.

    - Different plugin repositories MAY each have a plugin with the same ID.

  classmethod plugin_label() → Localizable

    Get the human-readable short plugin label.

  register_event_handlers(registry: EventHandlerRegistry) → None

    Register event handlers with the project.

final class betty.extension.demo.DemoServer

  Bases: `Server`

  Serve the Betty demonstration site.

  __init__(app: App)
  property public_url: str

    The server’s public URL.

  async start() → None

    Start the server.

  async stop() → None

    Stop the server.

betty.extension.demo.demo_project(app: App) → AsyncIterator[Project]

  Create a new demonstration project.