bokeh.model

Provide a base class for all objects (called Bokeh Models) that can go in a Bokeh Document.

collect_models(*input_values)[source]

Collect a duplicate-free list of all other Bokeh models referred to by this model, or by any of its references, etc.

Iterate over input_values and descend through their structure collecting all nested Models on the go. The resulting list is duplicate-free based on objects’ identifiers.

Parameters:*input_values (Model) – Bokeh models to collect other models from
Returns:all models reachable from this one.
Return type:list[Model]
get_class(view_model_name)[source]

Look up a Bokeh model class, given its view model name.

Parameters:view_model_name (str) – A view model name for a Bokeh model to look up
Returns:the model class corresponding to view_model_name
Return type:Model
Raises:KeyError, if the model cannot be found

Example

>>> from bokeh.model import get_class
>>> get_class("Range1d")
<class 'bokeh.models.ranges.Range1d'>