{"id":2655,"library":"panel","title":"Panel: Data Exploration & Web App Framework","description":"Panel is an open-source Python library that allows you to easily create interactive web-based dashboards and applications directly from Python code. It integrates seamlessly with the PyData ecosystem, offering powerful, interactive data tables, visualizations, and more. It supports rapid development of exploratory applications and building complex, multi-page apps with rich interactivity. [2, 3]","status":"active","version":"1.8.10","language":"en","source_language":"en","source_url":"https://github.com/holoviz/panel","tags":["dashboard","web-app","data-visualization","interactive","holoviz","python"],"install":[{"cmd":"pip install panel","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Panel uses Bokeh Server by default for serving apps and for rendering many interactive components. [1, 19]","package":"bokeh","optional":false},{"reason":"Param is foundational to Panel's reactivity, providing super-charged attributes and a dependency system. [3, 9]","package":"param","optional":false},{"reason":"Commonly used for data handling and integration with data tables. [13]","package":"pandas","optional":true},{"reason":"Member of the HoloViz ecosystem; provides a powerful plotting API often used with Panel. [3, 10]","package":"holoviews","optional":true},{"reason":"Member of the HoloViz ecosystem; provides a high-level plotting API for dataframes, built on HoloViews. [3, 10]","package":"hvplot","optional":true},{"reason":"Supported plotting integration, though can have regressions in specific Panel versions. [15]","package":"plotly","optional":true}],"imports":[{"note":"Standard conventional import alias.","symbol":"panel","correct":"import panel as pn"},{"note":"Required in Jupyter/IPython notebooks to load JavaScript dependencies and configure Panel for bidirectional communication. [6, 19]","wrong":"Forgetting pn.extension() in notebooks","symbol":"extension","correct":"pn.extension()"}],"quickstart":{"code":"import panel as pn\n\npn.extension()\n\n# Create a simple Panel component\nhello_world_pane = pn.pane.Markdown(\"## Hello, Panel!\")\n\n# Display the component in a server app\n# In a Jupyter/IPython notebook, this will display the app inline.\n# To serve as a standalone app, save as `app.py` and run `panel serve app.py --dev`\nhello_world_pane.servable()","lang":"python","description":"This quickstart creates a simple 'Hello, Panel!' Markdown pane and makes it servable. When run in a Jupyter notebook, it will display directly. When saved as a Python file (e.g., `app.py`) and executed with `panel serve app.py --dev` from the terminal, it launches a web server displaying the app. [6]"},"warnings":[{"fix":"Ensure `pn.extension()` is called at the beginning of your notebook or script when developing in a notebook environment.","message":"Always call `pn.extension()` in Jupyter/IPython notebooks. Forgetting this can lead to unexpected display issues or lack of interactivity, as it sets up crucial JavaScript dependencies and communication channels. [19]","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `None` as a default argument and initialize the mutable object inside the function if `None` is detected (e.g., `def func(data=None): if data is None: data = []`).","message":"Avoid mutable default arguments in functions or methods used with Panel's reactivity, especially if they are modified. Python evaluates default arguments once when the function is defined, leading to shared state across calls if the default is mutable (e.g., a list or dictionary). [20, 21]","severity":"gotcha","affected_versions":"All versions"},{"fix":"Reserve `watch=True` for callbacks that are not otherwise being monitored by a Panel layout. For methods directly passed to a Panel layout (e.g., `pn.Column(obj.view)`), it's generally not needed.","message":"Be cautious when using `watch=True` with `param.depends` decorators on methods that are already displayed in a Panel layout. Panel automatically monitors dependencies for displayed components, and explicitly setting `watch=True` can cause the method to be invoked twice. [8]","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to Panel's release notes and documentation for recommended or required dependency versions, especially when encountering unexpected rendering or interactivity issues after upgrading.","message":"Frequent updates to Panel and its underlying dependencies (like Bokeh, Plotly, Vega, Tabulator) mean that specific versions of these libraries might be required for optimal compatibility. For example, recent releases often include fixes for compatibility with newer Bokeh versions. [14, 15]","severity":"gotcha","affected_versions":"All 1.x versions"},{"fix":"For complex or high-performance apps, explicitly choose the appropriate `pn.pane` class rather than relying solely on `pn.panel()`.","message":"Using `pn.panel()` is convenient for displaying various Python objects, but for performance-critical applications, it's often more efficient to directly use specific `pn.pane` types (e.g., `pn.pane.Markdown`, `pn.pane.Plotly`) if you know the object type. `pn.panel()` uses a heuristic that might not always be the most performant. [10]","severity":"gotcha","affected_versions":"All 1.x versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}