betty.extension.demo package

Module contents

Provide demonstration site functionality.

final class betty.extension.demo.Demo[source]

Bases: Extension

Provide demonstration site functionality.

classmethod depends_on() set[PluginId][source]

The extensions this one depends on, and comes after.

classmethod plugin_id() PluginId[source]

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[source]

Get the human-readable short plugin label.

register_event_handlers(registry: EventHandlerRegistry) None[source]

Register event handlers with the project.

final class betty.extension.demo.DemoServer[source]

Bases: Server

Serve the Betty demonstration site.

__init__(app: App)[source]
property public_url: str

The server’s public URL.

async start() None[source]

Start the server.

async stop() None[source]

Stop the server.

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

Create a new demonstration project.