A high level app and dashboarding solution for Python.
Project description
Panel: the most flexible data app framework for Python
Build Status | |
Coverage | |
Latest dev release | |
Latest release | |
Docs | |
Binder | |
Support |
Home | Installation instructions | Getting Started Guide | Reference Guides | Examples | License | Support
Panel works with the tools you know and love
Panel makes it easy to combine widgets, plots, tables and other viewable Python objects into custom analysis tools, applications, and dashboards.
Panel works really well with the visualization tools you already know and love like Altair/ Vega, Bokeh, Datashader, Deck.gl/ pydeck, Echarts/ pyecharts, Folium, HoloViews, hvPlot, plotnine, Matplotlib, Plotly, PyVista/ VTK, Seaborn and more. Panel also works with the ipywidgets ecosystem.
Panel provides bi-directional communication making it possible to react to clicks, selections, hover etc. events.
You can develop in Jupyter Notebooks as well as editors like VS Code, PyCharm or Spyder.
Panel provides a unique combination of deployment options. You can share your data and models as
- a web application running on the Tornado (default), Flask, Django or Fast API web server.
- a stand alone client side application powered by Pyodide or PyScript via
panel convert
. - an interactive Jupyter notebook component.
- a static
.html
web page, a.gif
video, a.png
image and more.
Panel has something to offer for every one from beginner to data pro.
Panel is a member of the HoloViz ecosystem
Panel is a member of the ambitious HoloViz dataviz ecosystem and has first class support for the other members like hvPlot (simple .hvplot plotting api), HoloViews (powerful plotting api), and Datashader (big data viz).
Panel is built on top of Param. Param enables you to annotate your code with parameter ranges, documentation, and dependencies between parameters and code. With this approach,
- you don't ever have to commit to whether your code will be used in a notebook, a data app, in batch processing, or reports.
- you will write less code and be able to develop large, maintainable code bases!
Mini getting-started
Head over to the getting started guide for more!
Installation Instructions
Panel can be installed on Linux, Windows, or Mac with conda
:
conda install -c pyviz panel
or with pip
:
pip install panel
See the Environments section below for additional instructions for your environment.
Interactive data apps
Bring your data or model
def model(n=5):
return "⭐"*n
Bind it to a Panel widget and lay it out.
import panel as pn
pn.extension()
slider = pn.widgets.IntSlider(value=5, start=1, end=5)
interactive_model = pn.bind(model, n=slider)
layout = pn.Column(slider, interactive_model)
For deployment on a web server wrap it in a nice template.
pn.template.FastListTemplate(
site="Panel", title="Example", main=[layout],
).servable()
Start the server with
panel serve name_of_script.py --show
or
panel serve name_of_notebook.ipynb --show
Environments
Panel can be used in a wide range of development environments:
Editor + Server
You can edit your Panel code as a .py
file in any text editor, marking the objects you want to render as .servable()
, then launch a server with:
panel serve my_script.py --autoreload --show
to open a browser tab showing your app or dashboard and backed by a live Python process. The --autoreload
flag ensures that the app reloads whenever you make a change to the Python source.
JupyterLab and Classic notebook
In the classic Jupyter notebook environment and JupyterLab, first make sure to load the pn.extension()
. Panel objects will then render themselves if they are the last item in a notebook cell. For versions of jupyterlab>=3.0
the necessary extension is automatically bundled in the pyviz_comms
package, which must be >=2.0. However note that for version of jupyterlab<3.0
you must also manually install the JupyterLab extension with:
jupyter labextension install @pyviz/jupyterlab_pyviz
Google Colab
In the Google Colaboratory notebook, first make sure to load the pn.extension()
. Panel objects will then render themselves if they are the last item in a notebook cell. Please note that in Colab rendering for each notebook cell is isolated, which means that every cell must reload the Panel extension code separately. This will result in somewhat slower and larger notebook than with other notebook technologies.
VSCode notebook
Visual Studio Code (VSCode) versions 2020.4.74986 and later support ipywidgets, and Panel objects can be used as ipywidgets since Panel 0.10 thanks to jupyter_bokeh
, which means that you can now use Panel components interactively in VSCode. Ensure you install jupyter_bokeh
with pip install jupyter_bokeh
or conda install -c bokeh jupyter_bokeh
and then enable the extension with pn.extension()
.
nteract and other ipywidgets notebooks
In other notebook environments that support rendering ipywidgets interactively, such as nteract, you can use the same underlying ipywidgets support as for vscode: Install jupyter_bokeh
and then use pn.extension(comms='ipywidgets')
.
Other environments
If your development environment offers embedded Python processes but does not support ipywidgets or Jupyter "comms" (communication channels), you will notice that some or all interactive functionality is missing. Some widgets that operate only in JavaScript will work fine, but others require communication channels between JavaScript and Python. In such cases you can either request ipywidgets or Panel support from the editor or environment, or else use the Editor + Server approach above.
Examples
Support & Feedback
- Usage questions and showcases -> HoloViz Community
- Bug reports and feature requests -> Github
- Developer discussions -> Gitter
For more detail check out the HoloViz Community Guide.
Contributing ❤️
Check out the Contributing Guide.
License
Panel is completely free and open-source. It is licensed under the BSD 3-Clause License.
Sponsors
The Panel project is grateful for the numerous contributions from the community including
- The awesome-panel.org project, tweets and videos by Marc Skov Madsen
- Inspiring blog posts, tweets and videos by Sophia Yang
- Cool videos by Thu Hien Vu
The Panel project is also very grateful for the sponsorship by the organizations and companies below:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for panel-0.14.3a1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52705292abf473149b6c54f6093cc18c6a0379459ecb5109136b802042354a10 |
|
MD5 | a5fb5edf2382ef80f931a8a32211488d |
|
BLAKE2b-256 | 47d924e6f615d5bacad2fc2a5cbbedcd1454d6ba93f701adf1863f158460a58c |