The powerful data exploration & web app framework for Python.
npx @tessl/cli install tessl/pypi-panel@1.7.0A comprehensive Python web application framework that enables building powerful interactive web applications, dashboards, and data exploration tools entirely in Python. Panel provides both high-level reactive APIs and lower-level callback-based APIs, making it suitable for both quick exploratory applications and complex multi-page applications with rich interactivity.
pip install panelimport panel as pnFor extension configuration:
pn.extension() # Basic setup
pn.extension('tabulator', 'bokeh') # With specific extensionsimport panel as pn
# Enable Panel extensions
pn.extension()
# Create basic components
text_input = pn.widgets.TextInput(value="Hello Panel", placeholder="Enter text")
button = pn.widgets.Button(name="Click me", button_type="primary")
# Create layout
layout = pn.Column(
"# My Panel App",
text_input,
button,
pn.pane.Markdown("Welcome to Panel!")
)
# Serve the app
layout.servable()
pn.serve(layout, port=5007, show=True)Panel's architecture is built around several key concepts:
bind, depends, and Param integrationThis design seamlessly integrates with the PyData ecosystem and popular visualization libraries including Altair, Bokeh, Matplotlib, Plotly, HoloViews, and many others.
Essential functions for configuration, serving, binding, and converting objects to Panel components.
def panel(obj, **params):
"""Convert Python objects to Panel components automatically"""
def serve(panels, **kwargs):
"""Serve Panel applications on web server"""
def extension(*args, **kwargs):
"""Configure Panel extensions and settings"""
def bind(function, *args, **kwargs):
"""Bind function parameters for reactive programming"""
def depends(*parameters):
"""Declare parameter dependencies for functions"""Container components for organizing and structuring Panel applications, from basic row/column layouts to advanced grid systems and modal dialogs.
class Column:
"""Vertical layout container"""
class Row:
"""Horizontal layout container"""
class Tabs:
"""Tabbed interface layout"""
class Card:
"""Card-style container with header/body"""
class GridSpec:
"""Matplotlib-style grid specification"""Comprehensive collection of interactive input components including text inputs, selections, sliders, buttons, tables, and specialized widgets for various data types.
class TextInput:
"""Single-line text input widget"""
class Select:
"""Dropdown selection widget"""
class IntSlider:
"""Integer slider widget"""
class Button:
"""Click button widget"""
class Tabulator:
"""Interactive data table widget"""Display components that render various content types including text, images, plots, and integration with popular visualization libraries.
class HTML:
"""HTML content pane"""
class Markdown:
"""Markdown content pane"""
class Bokeh:
"""Bokeh plot pane"""
class Matplotlib:
"""Matplotlib figure pane"""
class Plotly:
"""Plotly figure pane"""Professional application templates providing structured layouts and theming for building production-ready web applications.
class BootstrapTemplate:
"""Bootstrap-based template"""
class MaterialTemplate:
"""Material Design template"""
class FastGridTemplate:
"""Fast loading grid template"""Complete chat interface system for building conversational applications with message feeds, input areas, and reaction components.
class ChatInterface:
"""Complete chat interface component"""
class ChatFeed:
"""Message feed component"""
class ChatMessage:
"""Individual chat message"""Classes for extending Panel with custom functionality using Python, JavaScript, React, or ESM modules.
class PyComponent:
"""Python-based custom component"""
class JSComponent:
"""JavaScript-based component"""
class ReactComponent:
"""React-based component"""Integration with the Param library for creating reactive UIs from parameterized classes and managing parameter dependencies.
class Param:
"""Auto-generate UI from Parameterized class"""
class ReactiveExpr:
"""Reactive expression component"""Complete authentication and authorization system supporting OAuth providers, basic authentication, and custom login handlers for securing enterprise applications.
class GoogleLoginHandler:
"""Google OAuth login handler"""
class BasicAuthProvider:
"""Base authentication provider for Panel applications"""
class OAuthProvider:
"""OAuth-based authentication provider"""
class BasicLoginHandler:
"""Basic username/password login handler"""Advanced reactive programming system for creating property links between Panel components, enabling sophisticated reactive patterns and cross-component synchronization.
class Link:
"""Base class for linking properties between components"""
class Callback:
"""Base callback class for reactive programming patterns"""
class JSCallbackGenerator:
"""Generates JavaScript callbacks for client-side property linking"""Workflow pipeline system for building multi-step interactive applications with directed graph navigation, supporting complex workflows and guided user experiences.
class Pipeline:
"""Directed graph of workflow stages for building multi-step applications"""
class PipelineError:
"""Custom error type for pipeline-specific error messages"""config: Config
"""Global Panel configuration object for themes, templates, sizing modes, and behavioral settings"""
state: State
"""Global application state manager for server-side state, caching, and periodic callbacks"""
rx: Module
"""Reactive expressions module from param library for advanced reactive programming"""
cache: Function
"""Caching decorator for function results to improve performance"""
indicators: Module
"""Indicator widgets module for progress bars, spinners, and status displays"""
interact: Function
"""Create interactive UI components from function parameters automatically"""
__version__: str
"""Panel version number string"""