This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

bokeh.model — Bokeh 1.0.3 documentation

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'>