☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Bokeh internals, triggering JS functions from Python

Community Support
Maxxner
Maxxner

If I understand the Bokeh internals correctly the server client syncing is done based when the data of model changes on either side.
Now I’m wondering if this can also be achieved with functions, basically both the Python and JS model would have a function foo(). Calling it on the Python side would then trigger the counterpart on the JS side. Is something like that supported with current architecture?

⌁   Link to post
Bryan
Bryan

There’s not explicit support for remote method invocation. The way folks usually accomplish this is to create DataModel and then trigger on_change and/or js_on_change callbacks by setting properties on an instance of the model.

⌁   Link to post
Maxxner
Maxxner

@Bryan Thank you for you reply. Usually this is also my way to go, however it feels rather clunky switching between Python and JS callbacks (this is also the motivation of this post). Independent of the current support, do you see this generally feasible with the current architecture?

⌁   Link to post

End of archived discussion · Replies are disabled