or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

authentication-system.mdchat-interface.mdcore-functions.mdcustom-components.mdindex.mdlayout-components.mdlinks-system.mdpane-system.mdparameter-integration.mdpipeline-system.mdtemplate-system.mdwidget-system.md
tile.json

tessl/pypi-panel

The powerful data exploration & web app framework for Python.

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/panel@1.7.x

To install, run

npx @tessl/cli install tessl/pypi-panel@1.7.0

index.mddocs/

Panel

A 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.

Package Information

  • Package Name: panel
  • Language: Python
  • Installation: pip install panel

Core Imports

import panel as pn

For extension configuration:

pn.extension()  # Basic setup
pn.extension('tabulator', 'bokeh')  # With specific extensions

Basic Usage

import 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)

Architecture

Panel's architecture is built around several key concepts:

  • Viewables: Base objects that can be displayed (Pane, Widget, Layout, Template)
  • Panes: Display components for various content types (HTML, images, plots, etc.)
  • Widgets: Interactive input components (buttons, sliders, text inputs, etc.)
  • Layouts: Container components for organizing other components (Row, Column, Tabs, etc.)
  • Templates: Professional application templates for structured layouts
  • Reactive System: Parameter-based reactivity with bind, depends, and Param integration

This design seamlessly integrates with the PyData ecosystem and popular visualization libraries including Altair, Bokeh, Matplotlib, Plotly, HoloViews, and many others.

Capabilities

Core Functions

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"""

Core Functions

Layout Components

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"""

Layout Components

Widget System

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"""

Widget System

Pane System

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"""

Pane System

Template System

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"""

Template System

Chat Interface

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"""

Chat Interface

Custom Components

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"""

Custom Components

Parameter Integration

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"""

Parameter Integration

Authentication System

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"""

Authentication System

Links System

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"""

Links System

Pipeline System

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"""

Pipeline System

Global Objects

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"""