panel Documentation

Panel: The powerful data exploration & web app framework for Python

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy panel on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name panel -p 80:80 --restart always ghcr.io/pterodactyl/panel:latest
Configured Services & Ports
โš™๏ธ database
image: mariadb:11
โš™๏ธ cache
image: redis:alpine
โš™๏ธ panel
image: ghcr.io/pterodactyl/panel:latest
๐Ÿ”Œ Ports: 80:80, 443:443
docker-compose.yml
yaml (docker-compose.yml)
x-common:
  database:
    &db-environment
    # Do not remove the "&db-password" from the end of the line below, it is important
    # for Panel functionality.
    MYSQL_PASSWORD: &db-password "CHANGE_ME"
    MYSQL_ROOT_PASSWORD: "CHANGE_ME_TOO"
  panel:
    &panel-environment
    APP_URL: "http://example.com"
    # A list of valid timezones can be found here: http://php.net/manual/en/timezones.php
    APP_TIMEZONE: "UTC"
    APP_SERVICE_AUTHOR: "[email protected]"
    # Uncomment the line below and set to a non-empty value if you want to use Let's Encrypt
    # to generate an SSL certificate for the Panel.
    # LE_EMAIL: ""
  mail:
    &mail-environment
    MAIL_FROM: "[email protected]"
    MAIL_DRIVER: "smtp"
    MAIL_HOST: "mail"
    MAIL_PORT: "1025"
    MAIL_USERNAME: ""
    MAIL_PASSWORD: ""
    MAIL_ENCRYPTION: "true"

#
# ------------------------------------------------------------------------------------------
# DANGER ZONE BELOW
#
# The remainder of this file likely does not need to be changed. Please only make modifications
# below if you understand what you are doing.
#
services:
  database:
    image: mariadb:11
    restart: always
    command: --default-authentication-plugin=mysql_native_password
    volumes:
      - "/srv/pterodactyl/database:/var/lib/mysql"
    environment:
      <<: *db-environment
      MYSQL_DATABASE: "panel"
      MYSQL_USER: "pterodactyl"
  cache:
    image: redis:alpine
    restart: always
  panel:
    image: ghcr.io/pterodactyl/panel:latest
    restart: always
    ports:
      - "80:80"
      - "443:443"
    links:
      - database
      - cache
    volumes:
      - "/srv/pterodactyl/var/:/app/var/"
      - "/srv/pterodactyl/nginx/:/etc/nginx/http.d/"
      - "/srv/pterodactyl/certs/:/etc/letsencrypt/"
      - "/srv/pterodactyl/logs/:/app/storage/logs"
    environment:
      <<: [*panel-environment, *mail-environment]
      DB_PASSWORD: *db-password
      APP_ENV: "production"
      APP_ENVIRONMENT_ONLY: "false"
      CACHE_DRIVER: "redis"
      SESSION_DRIVER: "redis"
      QUEUE_DRIVER: "redis"
      REDIS_HOST: "cache"
      DB_HOST: "database"
      DB_PORT: "3306"
      HASHIDS_LENGTH: 8
networks:
  default:
    ipam:
      config:
        - subnet: 172.20.0.0/16

File: README.md

Panel: The powerful data exploration & web app framework for Python

Panel is an open-source Python library that lets you easily build powerful tools, dashboards and complex applications entirely in Python. It has a batteries-included philosophy, putting the PyData ecosystem, powerful data tables and much more at your fingertips. High-level reactive APIs and lower-level callback based APIs ensure you can quickly build exploratory applications, but you aren't limited if you build complex, multi-page apps with rich interactivity. Panel is a member of the HoloViz ecosystem, your gateway into a connected ecosystem of data exploration tools.


Enjoying Panel? Show your support with a Github star โ€” itโ€™s a simple click that means the world to us and helps others discover it too! โญ๏ธ


Downloads
Build Status
Coverage
Latest dev release
Latest release
Docs
Notebooks
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:

bash
conda install panel

or with pip:

bash
pip install panel

See the Environments section below for additional instructions for your environment.

Interactive data apps

Bring your data or model

python
def model(n=5):
    return "โญ"*n

Bind it to a Panel widget and lay it out.

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

python
pn.template.FastListTemplate(
    site="Panel", title="Example", main=[layout],
).servable()

Start the server with

bash
panel serve name_of_script.py --show

or

bash
panel serve name_of_notebook.ipynb --show

Examples

Get started

Develop applications in your favorite notebook or editor environment, including Jupyter(Lab) notebooks, VSCode, Google Colab and many more, see our getting started guide for more details.

Support & Feedback

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 also very grateful for the sponsorship by the organizations and companies below:


File: doc/api/cheatsheet.md

Cheat Sheet

In order to get the best use out of the Panel user guide, it is important to have a grasp of some core concepts, ideas, and terminology.

Components

Panel provides three main types of component: Pane, Widget, and Panel. These components are introduced and explained in the Components guide, but briefly:

  • Pane: A Pane wraps a user supplied object of almost any type and turns it into a renderable view. When the wrapped object or any parameter changes, a pane will update the view accordingly.

  • Widget: A Widget is a control component that allows users to provide input to your app or dashboard, typically by clicking or editing objects in a browser, but also controllable from within Python.

  • Panel: A Panel is a hierarchical container to lay out multiple components (panes, widgets, or other Panels) into an arrangement that forms an app or dashboard.


APIs

Panel is a very flexible system that supports many different usage patterns, via multiple application programming interfaces (APIs). Each API has its own advantages and disadvantages, and is suitable for different tasks and ways of working. The API guide goes through each of the APIs in detail, comparing their pros and cons and providing recommendations on when to use each.

[Reactive functions](../how_to/interactivity/index.md)

Defining a reactive function using the pn.bind function or pn.depends decorator provides an explicit way to link specific inputs (such as the value of a widget) to some computation in a function, reactively updating the output of the function whenever the parameter changes. This approach is a highly convenient, intuitive, and flexible way of building interactive UIs.

[``Param``](../how_to/param/index.md)

Panel itself is built on the param library, which allows capturing parameters and their allowable values entirely independently of any GUI code. By using Param to declare the parameters along with methods that depend on those parameters, even very complex GUIs can be encapsulated in a tidy, well-organized, maintainable, and declarative way. Panel will automatically convert parameter definition to corresponding widgets, allowing the same codebase to support command-line, batch, server, and GUI usage. This API requires the use of the param library to express the inputs and encapsulate the computations to be performed, but once implemented this approach leads to flexible, robust, and well encapsulated code. See the Panel Param how-to guides for more detail.

At the lowest level, you can build interactive applications using Pane, Widget, and Panel components and connect them using explicit callbacks. Registering callbacks on components to modify other components provides full flexibility in building interactive features, but once you have defined numerous callbacks it can be very difficult to track how they all interact. This approach affords the most amount of flexibility but can easily grow in complexity, and is not recommended as a starting point for most users. That said, it is the interface that all the other APIs are built on, so it is powerful and is a good approach for building entirely new ways of working with Panel, or when you need some specific behavior not covered by the other APIs. See the callback and linking how-to guide for more detail.


Display and rendering

Throughout this user guide we will cover a number of ways to display Panel objects, including display in a Jupyter notebook, in a standalone server, by saving and embedding, and more.

Notebook

All of Panel's documentation is built from Jupyter notebooks that you can explore at your own pace. Panel does not require Jupyter in any way, but it has extensive Jupyter support:

``pn.extension()``

The Panel extension loads BokehJS, any custom models required, and optionally additional custom JS and CSS in Jupyter notebook environments. It also allows passing any pn.config variables.

``pn.ipywidget()``

Given a Panel model pn.ipywidget will return an ipywidget model that renders the object in the notebook. This can be useful for including an panel widget in an ipywidget layout and deploying Panel objects using Voilร .

``pn.io.push_notebook``

When working with Bokeh models directly in a Jupyter Notebook any changes to the model are not automatically sent to the frontend. Instead we have to explicitly call pn.io.push_notebook on the Panel component(s) wrapping the Bokeh component being updated.

Rich display

Jupyter notebooks allow the final value of a notebook cell to display itself, using a mechanism called rich display. As long as pn.extension() has been called in a notebook, all Panel components (widgets, panes, and panels) will display themselves when placed on the last line of a notebook cell.

Python REPL and embedding a server

When working in a Python REPL that does not support rich-media output (e.g. in a text-based terminal) or when embedding a Panel application in another tool, a panel can be launched in a browser tab using:

``.show()``

The .show() method is present on all viewable Panel objects and starts a server instance then opens a browser tab to point to it. To support working remotely, a specific port on which to launch the app can be supplied.

``pn.serve()``

Similar to .show() on a Panel object but allows serving one or more Panel apps on a single server. Supplying a dictionary mapping from the URL slugs to the individual Panel objects being served allows launching multiple apps at once. Note that to ensure that each user gets separate session state you should wrap your app in a function which returns the Panel component to render. This ensures that whenever a new user visits the application a new instance of the application can be created.

Command line

Panel mirrors Bokeh's command-line interface for launching and exporting apps and dashboards:

``panel serve app.py``

The panel serve command allows allows interactively displaying and deploying Panel web-server apps from the commandline.

``panel serve app.ipynb``

panel serve also supports using Jupyter notebook files, where it will serve any Panel objects that were marked .servable() in a notebook cell. This feature allows you to maintain a notebook for exploring and analysis that provides certain elements meant for broader consumption as a standalone app.

Export

When not working interactively, a Panel object can be exported to a static file.

``.save()`` to PNG

The .save method present on all viewable Panel objects allows saving the visual representation of a Panel object to a PNG file.

``.save()`` to HTML

.save to HTML allows sharing the full Panel object, including any static links ("jslink"s) between widgets and other components, but other features that depend on having a live running Python process will not work (as for many of the Panel webpages).

Embedding

Panel objects can be serialized into a static JSON format that captures the widget state space and the corresponding plots or other viewable items for each combination of widget values, allowing fully usable Panel objects to be embedded into external HTML files or emails. For simple cases, this approach allows distributing or publishing Panel apps that no longer require a Python server in any way. Embedding can be enabled when using .save(), using the .embed() method or globally using [Python and Environment variables](#Python and Environment variables) on pn.config.

``.embed()``

The .embed() method embeds the contents of the object it is being called on in the notebook.


Linking and callbacks

One of the most important aspects of a general app and dashboarding framework is the ability to link different components in flexible ways, scheduling callbacks in response to internal and external events. Panel provides convenient lower and higher-level APIs to achieve both. For more details, see the callback and linking how-tos .

Methods

``.param.watch``

The .param.watch method allows listening to parameter changes on an object using Python callbacks. It is the lowest level API and provides the most amount of control, but higher-level APIs are more appropriate for most users and most use cases.

The Python-based .link() method present on all viewable Panel objects is a convenient API to link the parameters of two objects together, uni- or bi-directionally.

``.jscallback``

The Javascript-based .jscallback() method allows defining arbitrary Javascript code to be executed when some property changes or event is triggered.

The JavaScript-based .jslink() method directly links properties of the underlying Bokeh models, making it possible to define interactivity that works even without a running Python server.


File: doc/api/config.md

Config

The pn.config object holds global configuration options for Panel.

The options can be set directly on the global config instance, via
keyword arguments to pn.extension or via environment variables.

For example to set the embed option the following approaches can be used:

python
pn.config.embed = True
pn.extension(embed=True)
os.environ['PANEL_EMBED'] = 'True'

Options Summary

`admin`

Whether the admin panel is enabled.

Default: False | Type: Boolean

`admin_endpoint` (`PANEL_ADMIN_ENDPOINT`)

Name to use for the admin endpoint.

Default: None | Type: String

`admin_log_level` (`PANEL_ADMIN_LOG_LEVEL`)

Log level of the Admin Panel logger

Default: 'DEBUG' | Type: Literal | Options: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'

`admin_plugins`

A list of tuples containing a title and a function that returns
an additional panel to be rendered into the admin page.

Default: [] | Type: List

`apply_signatures`

Whether to set custom Signature which allows tab-completion
in some IDEs and environments.

Default: True | Type: Boolean

`auth_template`

A jinja2 template rendered when the authorize_callback determines
that a user in not authorized to access the application.

Default: None | Type: Path

`authorize_callback`

Authorization callback that is invoked when authentication
is enabled. The callback is given the user information returned
by the configured Auth provider and should return True or False
depending on whether the user is authorized to access the
application. The callback may also contain a second parameter,
which is the requested path the user is making. If the user
is authenticated and has explicit access to the path, then
the callback should return True otherwise it should return
False.

Default: None | Type: Callable

`autoreload`

Whether to autoreload the page whenever the script or one of its dependencies changes.

Default: False | Type: Boolean

`basic_auth` (`PANEL_BASIC_AUTH`)

Password, dictionary with a mapping from username to password
or filepath containing JSON to use with the basic auth
provider.

Default: None | Type: ClassSelector

`basic_auth_template`

A jinja2 template to override the default Basic Authentication
login page.

Default: None | Type: Path

`browser_info`

Whether to request browser info from the frontend.

Default: True | Type: Boolean

`comms` (`PANEL_COMMS`)

Whether to render output in Jupyter with the default Jupyter
extension or use the jupyter_bokeh ipywidget model.

Default: 'default' | Type: Literal | Options: 'default', 'ipywidgets', 'vscode', 'colab'

`console_output` (`PANEL_CONSOLE_OUTPUT`)

How to log errors and stdout output triggered by callbacks
from Javascript in the notebook.

Default: 'accumulate' | Type: Literal | Options: 'accumulate', 'replace', 'disable', 'False'

Path setting that controls the scope of cookies. Specifies the URL path
prefix that must exist in the requested URL for the browser to send the
Cookie header. The default value '/' allows cookies to be sent to all paths.
A more restrictive path like '/app1/' would limit cookies to only be sent
to URLs under that path.

Default: '/' | Type: String

Configure to enable getting/setting secure cookies.

Default: None | Type: String

`css_files`

External CSS files to load.

Default: [] | Type: List

`defer_load`

Whether to defer load of rendered functions.

Default: False | Type: Boolean

`design`

The design system to use to style components.

Default: None | Type: ClassSelector

`disconnect_notification`

The notification to display to the user when the connection
to the server is dropped.

Default: '' | Type: String

`embed` (`PANEL_EMBED`)

Whether plot data will be embedded.

Default: False | Type: Boolean

`embed_json` (`PANEL_EMBED_JSON`)

Whether to save embedded state to json files.

Default: False | Type: Boolean

`embed_json_prefix` (`PANEL_EMBED_JSON_PREFIX`)

Prefix for randomly generated json directories.

Default: '' | Type: String

`embed_load_path` (`PANEL_EMBED_LOAD_PATH`)

Where to load json files for embedded state.

Default: None | Type: String

`embed_save_path` (`PANEL_EMBED_SAVE_PATH`)

Where to save json files for embedded state.

Default: './' | Type: String

`exception_handler`

General exception handler for events.

Default: None | Type: Callable

`global_css`

List of raw CSS to be added to the header.

Default: [] | Type: List

`global_loading_spinner`

Whether to add a global loading spinner for the whole application.

Default: False | Type: Boolean

`inline` (`PANEL_INLINE`)

Whether to inline JS and CSS resources. If disabled, resources
are loaded from CDN if one is available.

Default: True | Type: Boolean

`js_files`

External JS files to load. Dictionary should map from exported
name to the URL of the JS file.

Default: {} | Type: Dict

`js_modules`

External JS files to load as modules. Dictionary should map from
exported name to the URL of the JS file.

Default: {} | Type: Dict

`layout_compatibility`

Provide compatibility for older layout specifications. Incompatible
specifications will trigger warnings by default but can be set to error.
Compatibility to be set to error by default in Panel 1.1.

Default: 'warn' | Type: Literal | Options: 'warn', 'error'

`load_entry_points`

Load entry points from external packages.

Default: True | Type: Boolean

`loading_color`

Color of the loading indicator.

Default: '#c3c3c3' | Type: Color

`loading_indicator`

Whether a loading indicator is shown by default while panes are updating.

Default: False | Type: Boolean

`loading_max_height`

Maximum height of the loading indicator.

Default: 400 | Type: Integer

`loading_spinner`

Loading indicator to use when component loading parameter is set.

Default: 'arc' | Type: Literal | Options: 'arc', 'arcs', 'bar', 'dots', 'petal'

`log_level` (`PANEL_LOG_LEVEL`)

Log level of Panel loggers

Default: 'WARNING' | Type: Literal | Options: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'

`notifications`

Whether to enable notifications functionality.

Default: False | Type: Boolean

`npm_cdn` (`PANEL_NPM_CDN`)

The CDN to load NPM packages from if resources are served from
CDN. Allows switching between https://unpkg.com and
https://cdn.jsdelivr.net/npm for most resources.

Default: 'https://cdn.jsdelivr.net/npm' | Type: Literal | Options: 'https://unpkg.com', 'https://cdn.jsdelivr.net/npm'

`nthreads` (`PANEL_NTHREADS`)

When set to a non-None value a thread pool will be started.
Whenever an event arrives from the frontend it will be
dispatched to the thread pool to be processed.

Default: None | Type: Integer

`oauth_encryption_key` (`PANEL_OAUTH_ENCRYPTION`)

A random string used to encode OAuth related user information.

Default: None | Type: ClassSelector

`oauth_expiry` (`PANEL_OAUTH_EXPIRY`)

Expiry of the OAuth cookie in number of days.

Default: 1 | Type: Number

`oauth_extra_params` (`PANEL_OAUTH_EXTRA_PARAMS`)

Additional parameters required for OAuth provider.

Default: {} | Type: Dict

`oauth_guest_endpoints` (`PANEL_OAUTH_GUEST_ENDPOINTS`)

List of endpoints that can be accessed as a guest without authenticating.

Default: None | Type: List

`oauth_jwt_user` (`PANEL_OAUTH_JWT_USER`)

The key in the ID JWT token to consider the user.

Default: None | Type: String

`oauth_key` (`PANEL_OAUTH_KEY`)

A client key to provide to the OAuth provider.

Default: None | Type: String

`oauth_optional` (`PANEL_OAUTH_OPTIONAL`)

Whether the user will be forced to go through login flow or if
they can access all applications as a guest.

Default: False | Type: Boolean

`oauth_provider` (`PANEL_OAUTH_PROVIDER`)

Select between a list of authentication providers.

Default: None | Type: Literal | Options: 'None'

`oauth_redirect_uri` (`PANEL_OAUTH_REDIRECT_URI`)

A redirect URI to provide to the OAuth provider.

Default: None | Type: String

`oauth_refresh_tokens` (`PANEL_OAUTH_REFRESH_TOKENS`)

Whether to automatically refresh access tokens in the background.

Default: False | Type: Boolean

`oauth_secret` (`PANEL_OAUTH_SECRET`)

A client secret to provide to the OAuth provider.

Default: None | Type: String

`profiler`

The profiler engine to enable.

Default: None | Type: Literal | Options: 'pyinstrument', 'snakeviz', 'memray'

`raw_css`

List of raw CSS strings to add to load.

Default: [] | Type: List

`ready_notification`

The notification to display when the application is ready and
fully loaded.

Default: '' | Type: String

`respect_explicit_sizing`

When enabled, explicitly set sizing_mode/width_policy/height_policy on a
layout are respected and never overridden by values inferred from the
layout's children. When disabled (the default) the legacy behaviour is
preserved: child-inferred values silently override explicit settings, but
a warning is emitted whenever such an override would occur so that the
incorrect specification can be corrected.

Default: False | Type: Boolean

`reuse_sessions`

Whether to reuse a session for the initial request to speed up
the initial page render. Note that if the initial page differs
between sessions, e.g. because it uses query parameters to modify
the rendered content, then this option will result in the wrong
content being rendered. Define a session_key_func to ensure that
reused sessions are only reused when appropriate.

Default: False | Type: Boolean

`safe_embed`

Ensure all bokeh property changes trigger events which are
embedded. Useful when only partial updates are made in an
app, e.g. when working with HoloViews.

Default: False | Type: Boolean

`session_history`

If set to a non-negative value this determines the maximum length
of the pn.state.session_info dictionary, which tracks
information about user sessions. A value of -1 indicates an
unlimited history.

Default: 0 | Type: Integer

`session_key_func`

Used in conjunction with the reuse_sessions option, the
session_key_func is given a tornado.httputil.HTTPServerRequest
and should return a key that uniquely captures a session.

Default: None | Type: Callable

`sizing_mode`

Specify the default sizing mode behavior of panels.

Default: None | Type: Literal | Options: 'fixed', 'stretch_width', 'stretch_height', 'stretch_both', 'scale_width', 'scale_height', 'scale_both', 'None'

`template`

The default template to render served applications into.

Default: None | Type: Literal | Options: 'bootstrap', 'fast', 'fast-list', 'material', 'golden', 'slides', 'vanilla'

`theme`

The theme to apply to components.

Default: None | Type: Literal | Options: 'default', 'dark'

`throttled`

If sliders and inputs should be throttled until release of mouse.

Default: False | Type: Boolean


File: doc/api/index.md

API Reference

The Panel API Reference Manual provides a comprehensive reference for
all methods and parameters on Panel components. For more information
on how to use the components see the Component Gallery.

Overview

::::{grid} 1 2 2 3
:gutter: 1 1 1 2

:::{grid-item-card} {octicon}workflow;2.5em;sd-mr-1 Cheat Sheet
:link: cheatsheet
:link-type: doc

The Cheat Sheet provides a high-level overview of some of the most important functions in Panel.
:::

:::{grid-item-card} {octicon}codespaces;2.5em;sd-mr-1 Config
:link: config
:link-type: doc

The panel.config provides a way to set high-level configuration options.
:::

:::{grid-item-card} {octicon}link;2.5em;sd-mr-1 State
:link: state
:link-type: doc

The panel.state object holds session state and provide various methods to attach events and tasks to a session.
:::

::::


Module Structure

panel.auth
: Module containing authentication handlers.

panel.chat
: Subpackage containing Panel Chat components

panel.command
: Subpackage containing Panel CLI commands

panel.compiler
: Utilities for bundling and compiling external JS and CSS resources.

panel.config
: Module containing Panel config and extension objects.

panel.custom
: Baseclasses for creating custom components.

panel.depends
: Module exposing param.bind and param.depends.

panel.interact
: Module implementing the interact API.

panel.io
: Subpackage containing all IO related functionality.

panel.layout
: Subpackage containing layout components

panel.links
: Module containing implementation responsible Javascript linking and callbacks.

panel.models
: Subpackage containing Bokeh model implementations of custom components.

panel.pane
: Subpackage containing Pane components.

panel.param
: Module implementing components for integration with the param library.

panel.pipeline
: Module containing the Pipeline component.

panel.reactive
: Module containing baseclasses for Panel components with reactive APIs.

panel.template
: Subpackage containing implementations for Template components.

panel.theme
: Subpackage implementing Design and Theme components.

panel.util
: Subpackage containing generic utilities.

panel.viewable
: Module containing baseclasses for all Panel components.

panel.widgets
: Subpackage containing Widget components.

{toctree}
:titlesonly:
:hidden:
:maxdepth: 2

cheatsheet
config
state
panel.auth
panel.chat
panel.command
panel.compiler
panel.config
panel.custom
panel.depends
panel.io
panel.layout
panel.links
panel.models
panel.pane
panel.param
panel.pipeline
panel.reactive
panel.template
panel.theme
panel.util
panel.viewable
panel.widgets

File: doc/api/state.md

State

The pn.state object makes various global state available and provides methods to manage that state.

Parameters

access_token
: The access token issued by the OAuth provider to authorize requests to its APIs.

busy
: A boolean value to indicate whether a callback is being actively processed.

cache
: A global cache which can be used to share data between different processes.

cookies
: HTTP request cookies for the current session.

curdoc
: When running a server session this property holds the current bokeh Document.

location
: In a server context this provides read and write access to the URL:

  • hash: hash in window.location e.g. '#interact'
  • pathname: pathname in window.location e.g. '/user_guide/Interact.html'
  • search: search in window.location e.g. '?color=blue'
  • reload: Reloads the page when the location is updated.
  • href (readonly): The full url, e.g. 'https://localhost:80?color=blue#interact'
  • hostname (readonly): hostname in window.location e.g. 'panel.holoviz.org'
  • protocol (readonly): protocol in window.location e.g. 'http:' or 'https:'
  • port (readonly): port in window.location e.g. '80'

headers
: HTTP request headers for the current session.

refresh_token
: The refresh token issued by the OAuth provider to authorize requests to its APIs (if available these are usually longer lived than the access_token).

served
:Whether we are currently inside a script or notebook that is being served using panel serve.

session_args
: When running a server session this return the request arguments.

session_info
: A dictionary tracking information about server sessions:

  • total (int): The total number of sessions that have been opened
  • live (int): The current number of live sessions
  • sessions (dict(str, dict)): A dictionary of session information:
    • started: Timestamp when the session was started
    • rendered: Timestamp when the session was rendered
    • ended: Timestamp when the session was ended
    • user_agent: User-Agent header of client that opened the session

webdriver
: Caches the current webdriver to speed up export of bokeh models to PNGs.

Methods

add_periodic_callback
: Schedules a periodic callback to be run at an interval set by the period

as_cached
: Allows caching data across sessions by memoizing on the provided key and keyword arguments to the provided function.

cancel_scheduled
: Cancel a scheduled task by name.

execute
: Executes both synchronous and asynchronous callbacks appropriately depending on the context the application is running in.

kill_all_servers
: Stops all running server sessions.

onload
: Allows defining a callback which is run when a server is fully loaded

schedule
: Schedule a callback periodically at a specific time (click here for more details)

sync_busy
: Sync an indicator with a boolean value parameter to the busy property on state


File: doc/about/index.md

About

Panel is completely open source, available under a BSD license freely for both commercial and non-commercial use. Panel was originally developed at Anaconda Inc. using funding from various commercial and government partners, and is now maintained by Anaconda developers along with community contributors.

Panel is part of the HoloViz family of tools. The holoviz.org website shows how to use Panel together with other libraries to solve complex problems, with detailed tutorials and examples. You can see a variety of projects using Panel at examples.pyviz.org, and you can compare Panel to other available tools at pyviz.org or on the Explanation > Comparisons page.

If you have any questions or usage issues visit the Panel Discourse site. If you are interested in contributing to Panel development to help address some of the open issues, see our developer instructions to set up your development environment.

If you like Panel and have built something you want to share, tweet a link or screenshot of your latest creation at @Panel_org, along with any other library you used (@HoloViews, @Datashader, @BokehPlots, @Matplotlib, etc.). Thanks!

{toctree}
:titlesonly:
:hidden:
:maxdepth: 2

releases
people
roadmap

File: doc/about/people.md

People

Project Lead

Philipp Rudiger (@philippfr)

Maintainers

  • Philipp Rudiger (@philippfr)
  • Simon Hansen (@Hoxbro)
  • Maxime Liquet (@maximlt)
  • Marc Skov Madsen (@MarcSkovMadsen)
  • Andrew Huang (@ahuang11)

Steering Committee

The Panel project is governed by the HoloViz steering committee.

CoC Subcommittee

  • James A. Bednar (@jbednar)
  • Sophia Yang (@sophiamyang)
  • Philipp Rudiger (@philippjfr)