Creating CheckBoxGroup with Python Callback

Hi!

I am searching for any example of creating a CheckboxGroup with a Bokeh Server using a PYTHON callback. All the documentation I’ve seen only covers the JS callback format. Any example with python would be much appreciated :slight_smile:

Here, e.g

https://github.com/bokeh/bokeh/blob/branch-3.3/examples/reference/models/checkbox_server.py
https://github.com/bokeh/bokeh/blob/branch-3.3/examples/server/app/line_on_off.py

Code grepping the examples directory of the source repo is always a good place to search for code to refer to.

FYI, all uses of on_change are essentially exactly the same, regardless of what widget is involved: it is invoked it on the object you want to watch with the name of the property you want to respond to, and it takes a python function of the form: def callback(attr, old, new). In this sense any of the examples can be useful references.