Panel lets you write Python code that corresponds to Javascript/HTML objects in a web browser, which requires some means of communication between the two languages. How this communication is achieved depends on the context in which Panel is used, i.e., whether it is being run in a notebook like Classic Jupyter, in JupyterLab, as a standalone web server, etc. Usually it all Just Works™, but in case it doesn't, or if you want to understand the details or limitations of a particular configuration, this page will explain which technologies are used in which contexts to achieve the required channels of communication.
Normally, any implementation with type 3 communication also has Python->JS synchronization, thus providing full JS<->Python bidirectional synchronization propagating updates in either direction as needed for full Python-backed web interfaces.
Here we focus on Panel objects, but this chart also applies to pure Bokeh figures and models, which have similar requirements, as well as objects built on Panel (e.g. HoloViews, GeoViews, and hvPlot objects).
Comm type | Scenario | Libraries/modules required |
---|---|---|
1 | Bokeh output to .html file | bokeh (bokeh/io/output.py) |
1 | Bokeh used without comms support (in dash, streamlit, JupyterLite, etc.) | bokeh (bokeh/io/output.py) |
1,2 | Bokeh displaying in Classic Jupyter w/o Python sync | bokeh (bokeh/io/notebook.py) |
1,2,3 | Bokeh object in a standalone server | bokeh server (or panel serve ) |
1,2 | Bokeh displaying in JupyterLab w/o Python sync | jupyter_bokeh |
1,2,3 | Bokeh object as an ipywidget | jupyter_bokeh |
1,2,3 | Bokeh object served in Voila | jupyter_bokeh |
1,2,3 | Panel object in vscode, nteract, or ipywidgets notebooks | jupyter_bokeh |
1,2,3 | ipywidgets in Bokeh-server apps | ipywidgets_bokeh |
1,2,3 | ipywidgets in Bokeh layout in Classic Jupyter | ipywidgets_bokeh |
1,2,3 | bidirectional Bokeh/Python syncing in Classic Jupyter | pyviz-comms |
1,2,3 | bidirectional Bokeh/Python syncing in JupyterLab | pyviz-comms |
1,2,3 | Panel object in Google colaboratory | pyviz-comms + panel (panel/viewable.py) |
1,2,3 | ipywidgets in Bokeh layout in JupyterLab | pyviz-comms + panel (panel/models/ipywidget.py) |
If you find the scenario of interest to you above, you can see from the right-most column which library (or which Bokeh or Panel module) implements that functionality, and thus e.g. where to open an issue if something is not working.