config Module#

config Module#

The config module supplies the global config object and the extension which provides convenient support for loading and configuring panel components.

class panel.config.panel_extension(*, name)[source]#

Bases: extension

Initializes and configures Panel. You should always run pn.extension. This will

  • Initialize the pyviz notebook extension to enable bi-directional

communication and for example plotting with Bokeh. - Load .js libraries (positional arguments). - Update the global configuration pn.config (keyword arguments).

Parameters:
  • *args (list[str]) – Positional arguments listing the extension to load. For example “plotly”, “tabulator”.

  • **params (dict[str,Any]) – Keyword arguments to be set on the pn.config element. See https://panel.holoviz.org/api/config.html

:param : :type : Example: :param >>> import panel as pn: :param >>> pn.extension(“plotly”: :param sizing_mode=”stretch_width”: :param template=”fast”): :param This will: :param - Initialize the pyviz notebook extension.: :param - Enable you to use the Plotly pane by loading plotly.js.: :param - Set the default sizing_mode to stretch_width instead of fixed.: :param - Set the global configuration pn.config.template to fast: :param i.e. you: :param will be using the FastListTemplate.:

classmethod instance(**params)[source]#

Return an instance of this class, copying parameters from any existing instance provided.