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

Convert to WASM.

Discover how to convert existing Panel applications to WebAssembly.

Use from WASM

Discover how to set up and use Panel from Pyodide and PyScript.

Sphinx Integration

Discover how to integrate live Panel components in your Sphinx based documentation.

JupyterLite

Discover how to set up a JupyterLite deployment capable of rendering interactive Panel output.

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.