Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
holoviz
GitHub Repository: holoviz/panel
Path: blob/main/doc/how_to/deployment/pycafe.md
2011 views

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.

Explore the panel-org gallery examples below:

Basic Tutorials

Intermediate Tutorials

Expert Tutorials


For more examples check out awesome-panel.org.