betty.extension.demo package - Betty 0.4.0a1 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.

class betty.extension.demo.Demo

  Bases: `Extension`, `Loader`

  Provide demonstration site functionality.

  Parameters:

    - app (`betty.app.App`)

    - args (`typing.Any`)

    - kwargs (`typing.Any`)

  classmethod depends_on() → set[type[betty.app.extension.Extension]]

    The extensions this one depends on, and comes after.

    Return type:

      `set`[`type`[`betty.app.extension.Extension`]]

  async load() → None

    Load ancestry data.

    Return type:

      `None`

  classmethod name() → str

    The machine name.

    Return type:

      `str`

  classmethod project() → betty.project.Project

    Create a new demonstration project.

    Return type:

      `betty.project.Project`

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`)

  classmethod label() → betty.locale.Localizable

    Get the server’s human-readable label.

    Return type:

      `betty.locale.Localizable`

  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`