bokeh.document.util¶
Provide ancillary utility functions useful for manipulating Bokeh documents.
-
initialize_references_json
(references_json, references, setter=None)[source]¶ Given a JSON representation of the models in a graph, and new model objects, set the properties on the models from the JSON
- Parameters
references_json (
JSON
) – JSON specifying attributes and values to initialize new model objects with.references (dict[str, Model]) –
A dictionary mapping model IDs to newly created (but not yet initialized) Bokeh models.
This is an “out” parameter. The values it contains will be modified in-place.
setter (ClientSession or ServerSession or None, optional) –
This is used to prevent “boomerang” updates to Bokeh apps. (default: None)
In the context of a Bokeh server application, incoming updates to properties will be annotated with the session that is doing the updating. This value is propagated through any subsequent change notifications that the update triggers. The session can compare the event setter to itself, and suppress any updates that originate from itself.