Calling JS from Python and Python from JS

Hello bokeh-community,

for our current project we are developing a leaflet-bokeh integration, which should be open source later.

The bokeh (bokeh server) has to communicate with the leaflet and vice versa. We use a custom LayoutDOM with a data-source for managing the objects which should be displayed in the map.

Our question is whether there is already a way to trigger the Python functions directly from the JS and to trigger JS functions directly from the Python or whether this only goes over the events of the corresponding objects.

Best regards,
Sandra Rum