Running Panel in the Browser with WASM#
Panel lets you write dashboards and other applications in Python that are accessed using a web browser. Typically, the Python interpreter runs as a separate Jupyter or Bokeh server process, communicating with JavaScript code running in the client browser. However, it is now possible to run Python directly in the browser, with no separate server needed!
The underlying technology involved is called WebAssembly (or WASM). More specifically, Pyodide pioneered the ability to install Python libraries, manipulate the web page’s DOM from Python, and execute regular Python code entirely in the browser. A number of libraries have sprung up around Python in WASM, including PyScript.
Panel can be run directly in Pyodide and has special support for rendering in PyScript.
This guide will take you through the process of either
Automatically converting Panel applications into a Pyodide/PyScript based application
Manually installing Panel in the browser and using it to render components.
Embedding Panel in your Sphinx documentation.
Setting up a Jupyterlite instance with support for Panel
Note that since Panel is built on Bokeh server and Tornado it is also possible to implement your own authentication independent of the OAuth components shipped with Panel, see the Bokeh documentation for further information.