common
Common generic widgets.
These basically integrate many default widgets provided by panel/bokeh into Metador.
FileWidget ¶
Bases: Widget
Simple widget based on (a subschema of) 'core.file'.
Allows to state supported MIME types with less boilerplate.
Source code in src/metador_core/widget/common.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
DispatcherWidget ¶
Bases: Widget
Meta-widget to dispatch a node+metadata object to a more specific widget.
Make sure that the dispatcher widget is probed before the widgets it can dispatch to.
This works if and only if for each widget in listed in WIDGETS
:
* the plugin name of the dispatcher is a prefix of the widget name, or
* the widget has primary = False
and thus is not considered by the dashboard.
Source code in src/metador_core/widget/common.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
WIDGETS
instance-attribute
¶
WIDGETS: List[Type[Widget]]
Widgets in the order they should be tested.
dispatch ¶
dispatch(w_cls: Type[Widget]) -> Widget
Dispatch to another widget (used by meta-widgets).
Source code in src/metador_core/widget/common.py
161 162 163 164 165 166 167 168 169 170 |
|