PyCafe Guide#
This guide demonstrates how to deploy a Panel app on py.cafe.
PyCafe is a platform for creating and sharing data apps online, powered by Pyodide. It offers a free tier for users. You can find the official PyCafe-Panel guide here.
1. Log In#
Visit py.cafe and either sign in or sign up for an account if you want to save your projects to your personal gallery.
2. Choose the Panel Framework#
Select the Panel framework from the available options or use the direct link PY.CAFE/snippet/panel.
3. Update the requirements.txt
File#
Add panel
and any other necessary dependencies to your requirements.txt
file:
panel
You don’t have to pin version of panel or other dependencies as PY.CAFE will create a lock file with pinned versions automatically.
4. Update the app.py
File#
Update your app.py
file with the following code:
import panel as pn
pn.extension()
def model(n=5):
return "⭐" * n
slider = pn.widgets.IntSlider(value=5, start=1, end=5)
interactive_model = pn.bind(model, n=slider)
layout = pn.Column(slider, interactive_model)
pn.template.FastListTemplate(
site="Panel", title="Example", main=[layout],
).servable()
After updating the file, save it, and the app will reload instantly.
Finally you can click PUSH to persist your app and click SHARE to share it with the world.
Example Gallery#
Explore the panel-org
gallery examples below:
Basic Github App from the GitHub repository.
Basic Tutorials#
Animation from the Build an Animation Tutorial.
Chatbot from the Build a Chatbot Tutorial.
Crossfilter Dashboard from the Build Crossfiltering Dashboard Tutorial.
Dashboard from the Build a Dashboard Tutorial.
Image Classifier from the Build an Image Classifier Tutorial.
Monitoring Dashboard from the Build an Monitoring Dashboard Tutorial.
Report from the Build a Report Tutorial.
Streaming Dashboard from the Build Streaming Dashboard Tutorial.
Todo app | Widget approach from the Build a todo app.
Intermediate Tutorials#
Todo App | Class approach from the Build a todo app.
Expert Tutorials#
Mario Chime Button | AnyWidget from the Custom AnyWidget Tutorial.
Mario Chime Button | JSComponent from the Custom JSComponent Tutorial.
App Gallery#
Altair Brushing from the Altair Brushing Tutorial.
hvPlot Explorer from the hvPlot Explorer Tutorial
NYC Deck.GL from the NYC Deck.Gl Tutorial.
VideoStream Interface from the VideoStream Interface Tutorial.
For more examples check out awesome-panel.org.