phenotypic.tools_.panel_.ensure_panel_extension#

phenotypic.tools_.panel_.ensure_panel_extension(*extensions: str, **kwargs) None[source]

Initialise pn.extension() once, only when inside IPython.

Safe to call multiple times — the extension is loaded at most once per process. Outside IPython the call is a silent no-op. When plotly is importable it is automatically included as an extension so Plotly figures render correctly in Panel layouts. The comms kwarg is auto-detected via _detect_comms() unless the caller supplies one explicitly.

Parameters:
  • *extensions (str) – Extra Panel extensions to load (e.g. "tabulator"). "plotly" is added automatically when Plotly is installed.

  • **kwargs – Forwarded to pn.extension() on the first call (e.g. inline=True). An explicit comms value wins over the auto-detected default.

Return type:

None