shyft.dashboard.base.selector_views

Functions

calculate_layout_width(width, padding)

Classes

AutocompleteInput(*, title[, width, height, ...])

Base class for all Widgets

BokehViewBase(*, title, bokeh_model[, ...])

Base class for all Widgets

CheckboxButtonGroup(*[, title, width, ...])

Base class for all Widgets

CheckboxGroup(*[, title, width, height, ...])

Base class for all Widgets

CheckboxGroupBokehViewBase(*[, title, ...])

Base class for all Widgets

FilterMultiSelect(*, title[, width, height, ...])

Base class for all Widgets

GroupBokehViewBase(*, title, bokeh_model[, ...])

Base class for all Widgets

MultiSelect(*, title[, width, height, ...])

Base class for all Widgets

RadioButtonGroup(*[, title, width, height, ...])

Base class for all Widgets

RadioGroup(*[, title, width, height, ...])

Base class for all Widgets

RadioGroupBokehViewBase(*[, title, width, ...])

Base class for all Widgets

Select(*[, title, width, height, padding, ...])

Base class for all Widgets

SelectorViewBase([logger])

The select view base class can be used to define custom selector views for the selector presenter.

TextInput([width, height, padding, title, ...])

A text input widget to get a text input and send it onward via a port.

TwoSelect(*[, title, width, height, ...])

Base class for all Widgets

class shyft.dashboard.base.selector_views.SelectorViewBase(logger=None)[source]

Bases: Widget

The select view base class can be used to define custom selector views for the selector presenter.

(For an custom select view see class SelectTwoView)

Base class for all Widgets

Parameters:

logger – Optional logger, e.g composable_logger_box

__init__(logger=None)[source]

Base class for all Widgets

Parameters:

logger – Optional logger, e.g composable_logger_box

Return type:

None

abstract property layout_components: Dict[str, List[Any]]

Property to return all layout.dom components of an visualisation app such that they can be arranged by the parent layout obj as desired.

Returns:

layout_components as:
{‘widgets’: [],

’figures’: []}

Return type:

dict

abstract property width: int
abstract property layout: LayoutDOM
shyft.dashboard.base.selector_views.calculate_layout_width(width, padding)[source]
class shyft.dashboard.base.selector_views.TwoSelect(*, title=None, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None)[source]

Bases: SelectorViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

__init__(*, title=None, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

Return type:

None

property layout: LayoutDOM
property layout_components: Dict[str, List[Any]]

Property to return all layout.dom components of an visualisation app such that they can be arranged by the parent layout obj as desired.

Returns:

layout_components as:
{‘widgets’: [],

’figures’: []}

Return type:

dict

property disabled: bool
property width: int
class shyft.dashboard.base.selector_views.FilterMultiSelect(*, title, width=None, height=None, sizing_mode=None, size=10, padding=None, filter_after_enter_is_pressed=False, case_sensitive=False, logger=None)[source]

Bases: SelectorViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • sizing_mode (str)

  • size (int)

  • padding (int)

  • filter_after_enter_is_pressed (bool)

  • case_sensitive (bool)

__init__(*, title, width=None, height=None, sizing_mode=None, size=10, padding=None, filter_after_enter_is_pressed=False, case_sensitive=False, logger=None)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • sizing_mode (str)

  • size (int)

  • padding (int)

  • filter_after_enter_is_pressed (bool)

  • case_sensitive (bool)

Return type:

None

property layout: LayoutDOM
property layout_components: Dict[str, List[Any]]

Property to return all layout.dom components of an visualisation app such that they can be arranged by the parent layout obj as desired.

Returns:

layout_components as:
{‘widgets’: [],

’figures’: []}

Return type:

dict

property disabled: bool
property width: int
class shyft.dashboard.base.selector_views.BokehViewBase(*, title, bokeh_model, width=None, height=None, padding=None, sizing_mode=None, logger=None, title_model=None, title_attribute=None, show_state_title=True, **bkwargs)[source]

Bases: SelectorViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • bokeh_model (<module 'bokeh.models' from '/usr/lib/python3.14/site-packages/bokeh/models/__init__.py'>)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • title_model (Any | None)

  • title_attribute (str | None)

  • show_state_title (bool)

__init__(*, title, bokeh_model, width=None, height=None, padding=None, sizing_mode=None, logger=None, title_model=None, title_attribute=None, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • bokeh_model (<module 'bokeh.models' from '/usr/lib/python3.14/site-packages/bokeh/models/__init__.py'>)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • title_model (Any | None)

  • title_attribute (str | None)

  • show_state_title (bool)

Return type:

None

property layout: LayoutDOM
property disabled: bool
property layout_components: Dict[str, List[Any]]

Property to return all layout.dom components of an visualisation app such that they can be arranged by the parent layout obj as desired.

Returns:

layout_components as:
{‘widgets’: [],

’figures’: []}

Return type:

dict

property width: int
class shyft.dashboard.base.selector_views.Select(*, title=None, width=None, height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Bases: BokehViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

__init__(*, title=None, width=None, height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

Return type:

None

class shyft.dashboard.base.selector_views.MultiSelect(*, title, width=None, height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Bases: BokehViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

__init__(*, title, width=None, height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

Return type:

None

class shyft.dashboard.base.selector_views.AutocompleteInput(*, title, width=None, height=None, padding=None, sizing_mode=None, logger=None, placeholder=None, keep_text_value=True, show_state_title=True, **bkwargs)[source]

Bases: BokehViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • placeholder (str | None)

  • keep_text_value (bool)

  • show_state_title (bool)

__init__(*, title, width=None, height=None, padding=None, sizing_mode=None, logger=None, placeholder=None, keep_text_value=True, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • placeholder (str | None)

  • keep_text_value (bool)

  • show_state_title (bool)

Return type:

None

class shyft.dashboard.base.selector_views.GroupBokehViewBase(*, title, bokeh_model, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Bases: BokehViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

__init__(*, title, bokeh_model, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

Return type:

None

property layout: LayoutDOM
property layout_components: Dict[str, List[Any]]

Property to return all layout.dom components of an visualisation app such that they can be arranged by the parent layout obj as desired.

Returns:

layout_components as:
{‘widgets’: [],

’figures’: []}

Return type:

dict

class shyft.dashboard.base.selector_views.RadioGroupBokehViewBase(*, title=None, bokeh_model, width=None, height=None, padding=None, text_height=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Bases: GroupBokehViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • text_height (int | None)

  • sizing_mode (str | None)

__init__(*, title=None, bokeh_model, width=None, height=None, padding=None, text_height=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • padding (int | None)

  • text_height (int | None)

  • sizing_mode (str | None)

Return type:

None

class shyft.dashboard.base.selector_views.RadioButtonGroup(*, title=None, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, **bkwargs)[source]

Bases: RadioGroupBokehViewBase

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

__init__(*, title=None, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

Return type:

None

class shyft.dashboard.base.selector_views.RadioGroup(*, title=None, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, **bkwargs)[source]

Bases: RadioGroupBokehViewBase

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

__init__(*, title=None, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

Return type:

None

class shyft.dashboard.base.selector_views.CheckboxGroupBokehViewBase(*, title=None, bokeh_model, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Bases: GroupBokehViewBase

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

__init__(*, title=None, bokeh_model, width=None, height=None, text_height=None, padding=None, sizing_mode=None, logger=None, show_state_title=True, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger (Optional) – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

  • padding (int | None)

  • sizing_mode (str | None)

  • show_state_title (bool)

Return type:

None

class shyft.dashboard.base.selector_views.CheckboxGroup(*, title=None, width=None, height=None, text_height=None, logger=None, **bkwargs)[source]

Bases: CheckboxGroupBokehViewBase

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

__init__(*, title=None, width=None, height=None, text_height=None, logger=None, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

Return type:

None

class shyft.dashboard.base.selector_views.CheckboxButtonGroup(*, title=None, width=None, height=None, text_height=None, logger=None, **bkwargs)[source]

Bases: CheckboxGroupBokehViewBase

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

__init__(*, title=None, width=None, height=None, text_height=None, logger=None, **bkwargs)[source]

Base class for all Widgets

Parameters:
  • logger – Optional logger, e.g composable_logger_box

  • title (str | None)

  • width (int | None)

  • height (int | None)

  • text_height (int | None)

Return type:

None

class shyft.dashboard.base.selector_views.TextInput(width=None, height=None, padding=None, title='Text input', sizing_mode=None, logger=None, **kwargs)[source]

Bases: Widget

A text input widget to get a text input and send it onward via a port.

The TextInput widget reads a string from the user, which then will be passed to the TextInputPresenter via the send_text_input port.

Constructor.

Parameters:
  • width (int | None) – The width of the widget.

  • height (int | None) – The height of the widget.

  • title (str) – The title of the widget.

  • padding (int | None) – Padding.

  • sizing_mode (str | None) – Sizing mode (options: “fixed”, “stretch_both”, “scale_width”, “scale_height”, “scale_both”).

  • logger (Optional) – A logger

  • kwargs

__init__(width=None, height=None, padding=None, title='Text input', sizing_mode=None, logger=None, **kwargs)[source]

Constructor.

Parameters:
  • width (int | None) – The width of the widget.

  • height (int | None) – The height of the widget.

  • title (str) – The title of the widget.

  • padding (int | None) – Padding.

  • sizing_mode (str | None) – Sizing mode (options: “fixed”, “stretch_both”, “scale_width”, “scale_height”, “scale_both”).

  • logger (Optional) – A logger

  • kwargs

Return type:

None

property layout: LayoutDOM

The layout of the widget. :return: self._layout

property layout_components: Dict[str, List[Any]]

Returns the components contained in the layout. :return: Dict of components (widgets and figures)

on_change(attr, old, new)[source]

Sends input value (a string) with the connection port (self.send_text_input).

Parameters:
  • attr – a sting (‘value’)

  • old – the previous string

  • new – the new string