Skip to content

Renderer

Bases: Generic[K_contra]

This object is responsible for rendering the embeds, views, and menus, by first using the templating engine to template the document, and then using the deserializer to deserialize the document into embeds and views.

render(key, callbacks=None, keywords=None, events=None)

This method is used to render an embed and a view, and places it in a NamedTuple

Parameters:

  • key (K) –

    key of the embed,

  • callbacks (Optional[Dict[str, Callable]], default: None ) –

    callbacks that are attached to the components of the view,

  • keywords (Dict[str, Any], default: None ) –

    keywords that are passed to the embed renderer to format the text,

  • events (Optional[EventCallbacks], default: None ) –

    callbacks that are called on events

Returns (ReturnType): All possible deserialized types