mbdlyb_ui.app

Copyright (c) 2026 TNO-ESI All rights reserved.

Attributes

MBDLYB_MENU_CLASS

MBDLYB_MODES

MBDLYB_URL_RESOLVER

Classes

App

Configure database access, routing, and shared UI settings for a NiceGUI app.

Functions

config_mapper(mappers, mappings)

Copy target-class entries to corresponding source-class keys.

Module Contents

class mbdlyb_ui.app.App(name: str, routers: list[nicegui.APIRouter] | None = None)

Configure database access, routing, and shared UI settings for a NiceGUI app.

add_router(*routers: nicegui.APIRouter)

Register routers with both this app and NiceGUI.

Parameters:

*routers – Routers containing pages served by this app.

run()

Initialize configuration and start the NiceGUI server.

DEFAULT_SETTINGS: dict[str, Any]
MENU_CLASS: type[mbdlyb.gdb.GMBDNet]
MODES = ['Editor']
URL_RESOLVER: dict[type[mbdlyb.gdb.GMBDIdentifiable] | str, str | Callable[[mbdlyb.gdb.GMBDIdentifiable], str]]
name: str
routers: list[nicegui.APIRouter]
mbdlyb_ui.app.config_mapper(mappers: list[dict], mappings: list[tuple[type[mbdlyb.gdb.GMBDElement], type[mbdlyb.gdb.GMBDElement]]])

Copy target-class entries to corresponding source-class keys.

Parameters:
  • mappers – Mutable mapping dictionaries to update in place.

  • mappings – Pairs of source and target element classes.

mbdlyb_ui.app.MBDLYB_MENU_CLASS: type[mbdlyb.gdb.GMBDNet]
mbdlyb_ui.app.MBDLYB_MODES: list[str] = []
mbdlyb_ui.app.MBDLYB_URL_RESOLVER: dict[type[mbdlyb.gdb.GMBDIdentifiable] | str, str | Callable[[mbdlyb.gdb.GMBDIdentifiable], str]]