composeui.core.registry¶
Map abstract renderer keys to each backend’s concrete renderer classes.
Adding a backend means adding one RendererType member here, with its extra, one
RENDERERS mapping in the backend’s renderers module, and
APPLICATION/MODEL_APPLICATION in its application module.
- class composeui.core.registry.Backend[source]¶
Bases:
NamedTupleA backend’s modules, by dotted path: none is imported until the backend is used.
- class composeui.core.registry.RendererType[source]¶
Bases:
EnumA renderer backend, identified by its modules.
- QT = ('composeui.qtcore.qtrenderer', 'composeui.qtcore.qtapplication', 'pyside6', ('PySide6', 'pyqtgraph', 'qtpy'))¶
- TEXTUAL = ('composeui.textualcore.textualrenderer', 'composeui.textualcore.textualapplication', 'tui', ('textual', 'textual_fspicker', 'textual_plotext'))¶
- WEB = ('composeui.webcore.webrenderer', 'composeui.webcore.webapplication', 'web', ('itsdangerous', 'markdown_it', 'markupsafe', 'python_multipart', 'starlette', 'uvicorn'))¶
- composeui.core.registry.create_renderer(renderer_type, key, view)[source]¶
Create the renderer registered under
keybyrenderer_type’s backend.Returns None when the backend doesn’t register
key, meaning it doesn’t support that widget: the view is then not rendered.- Parameters:
renderer_type (RendererType)
key (str)
view (Any)
- Return type:
Renderer[Any, Any] | None