betty.extension.demo package - Betty 0.4.0a3 documentation

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`, `Loader`

  Provide demonstration site functionality.

  Parameters:

    - project (`betty.project.Project`)

    - args (`typing.Any`)

    - kwargs (`typing.Any`)

  classmethod depends_on() → set[PluginId]

    The extensions this one depends on, and comes after.

    Return type:

      `set`[`str`]

  async load() → None

    Load ancestry data.

    Return type:

      `None`

  classmethod plugin_id() → str

    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.

    Return type:

      `str`

  classmethod plugin_label() → betty.locale.localizable.Localizable

    Get the human-readable short plugin label.

    Return type:

      `betty.locale.localizable.Localizable`

final class betty.extension.demo.DemoServer

  Bases: `Server`

  Serve the Betty demonstration site.

  Parameters:

    app (`betty.app.App`)

  __init__(app: betty.app.App)
    Parameters:

      app (`betty.app.App`)

  property public_url: str

    The server’s public URL.

  async start() → None

    Start the server.

    Return type:

      `None`

  async stop() → None

    Stop the server.

    Return type:

      `None`

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

  Create a new demonstration project.

  Parameters:

    app (`betty.app.App`)

  Return type:

    `collections.abc.AsyncIterator`[`betty.project.Project`]