shyft.dashboard.examples.selector_model¶
Example how to implement a data selector model using the SelectorModelBase
Classes
|
Init of base app |
|
Simple selector which takes a dom obj: Dict[str, int] |
- class shyft.dashboard.examples.selector_model.TimesElevenPlusFiveSelector(presenter, sleep_time, logger=None)[source]¶
Bases:
SelectorModelBaseSimple selector which takes a dom obj: Dict[str, int]
When a selection is made we want to return a new dom obj whitch contains a new dom obj for all the selected entries where the value_new = value_old + 11 * 5.
In addition since calculating takes long time, we will wait for sleep_time before we send the results.
This is just for the purpose of …
- Parameters:
presenter (SelectorPresenter)
- __init__(presenter, sleep_time, logger=None)[source]¶
- Parameters:
presenter (SelectorPresenter)
- Return type:
None
- process_selection_evaluation(*args, **kwargs)¶
- loading_function(*args, **kwargs)¶
- class shyft.dashboard.examples.selector_model.CompSelectorModelExample(thread_pool, app_kwargs=None)[source]¶
Bases:
AppBaseInit of base app
- Parameters:
thread_pool – Optional thread pool used for async calls within the app
app_kwargs (Dict[str, Any] | None) – Optional keyword arguments provided to the app through the start_bokeh_apps methods
- __init__(thread_pool, app_kwargs=None)[source]¶
Init of base app
- Parameters:
thread_pool – Optional thread pool used for async calls within the app
app_kwargs (Dict[str, Any] | None) – Optional keyword arguments provided to the app through the start_bokeh_apps methods
- property name: str¶
This property returns the name of the app