paidiverpy.frontend.widgets.utils

paidiverpy.frontend.widgets.utils#

Utility functions for creating widgets in Panel.

Functions#

create_title(→ panel.pane.HTML)

Create a title pane with the given string.

is_running_in_panel_server(→ bool)

Detect if running inside a Panel server (i.e., interactive app mode).

Module Contents#

paidiverpy.frontend.widgets.utils.create_title(title_str: str, html_h_tag: int = 1, bold: bool = True) panel.pane.HTML[source]#

Create a title pane with the given string.

Parameters:
  • title_str (str) – The title text.

  • html_h_tag (int) – The HTML heading tag to use (1-6).

  • bold (bool) – Whether to make the title bold.

Returns:

A Panel HTML pane containing the title.

Return type:

pn.pane.HTML

paidiverpy.frontend.widgets.utils.is_running_in_panel_server() bool[source]#

Detect if running inside a Panel server (i.e., interactive app mode).

Returns:

True if running in a Panel server, False otherwise.

Return type:

bool