If you have not noticed you can now actually run Panel apps entirely in the browser using PyScript. I.e. you don’t need to deploy to a server. You can just email your Panel app as a file, put it on Github pages or similar.
The below is a simple example. You can find the official examples at PyScript demo.
<html>
<head>
<title>Panel Example</title>
<meta charset="iso-8859-1">
<link rel="icon" type="image/x-icon" href="./favicon.png">
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js"></script>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@holoviz/panel@0.13.1/dist/panel.min.js"></script>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<style>
table { width: 500px;}
h1 {font-size: 30px}
</style>
</head>
<py-env>
- bokeh
- numpy
- panel==0.13.1
</py-env>
<body>
<div id="simple_app"></div>
<py-script>
import panel as pn
import calendar
pn.extension(sizing_mode="stretch_width")
month = pn.widgets.IntSlider(start=1, end=12, name='Month')
def callback(new):
c=calendar.HTMLCalendar(calendar.SUNDAY)
return c.formatmonth(2022,new)
pn.Column(
"# Panel PyScript Calendar Example",
month,
pn.bind(callback, month),
).servable(target='simple_app');
</py-script>
</body>
</html>