ploteries.cli_interface.cli_interface¶
Interface to ploteries launch CLI.
Module Attributes
|
The name of the tab and group where the figure will be placed. |
|
name:str, Specifies the figures absolute name. |
Classes
|
Implements the interface (methods |
|
The name of the tab and group where the figure will be placed. |
|
name:str, Specifies the figures absolute name. |
- class ploteries.cli_interface.cli_interface.PosnTuple(tab, group, abs_name, rel_name)¶
The name of the tab and group where the figure will be placed.
- abs_name¶
Alias for field number 2
- group¶
Alias for field number 1
- rel_name¶
Alias for field number 3
- tab¶
Alias for field number 0
- class ploteries.cli_interface.cli_interface.RenderedFigure(name, posn, html)¶
name:str, Specifies the figures absolute name. posn:PosnTuple, Specifies the figure’s hierarchical position. html:<Dash html obj> HTML object for the figure.
- html¶
Alias for field number 2
- name¶
Alias for field number 0
- posn¶
Alias for field number 1
- class ploteries.cli_interface.cli_interface.PloteriesLaunchInterface(data_store, hooks=None)¶
Implements the interface (methods
render_empty_figures()andcreate_callbacks())) required by the ‘ploteries launch’ CLI to access the data and figures in a data store.- render_empty_figures()¶
Generates empty place holders for all figures.
- get_hook(handler_type: DataHandler)¶
Tries to find a matching hook based on class inheritance structure.
- classmethod create_callbacks(app_callback: Callable, get_interface: Callable[[str], PloteriesLaunchInterface], callback_args: Dict[str, State | Input | Output])¶
This method creates the callbacks required to support web visualizations. It should only be called once to avoid multiply defining callbacks.
PloteriesLaunchInterfacesupports Dash apps where the data store (i.e., the instance of thePloteriesLaunchInterface) is changed by the user from the web interface. Each callback will thus first retrieve the relevantPloteriesLaunchInterfaceobject by calling the input callableget_interface, which takes an interface name that is in turn received by the callback from theInputinterface_name.: param app_callback: Method
dash.Dash.callback()used to decorate callbacks, from the globalAPPobject. : param get_interface: Callable that returns an instance of this class. Will be used within hook callbacks to process requests. : param callback_args: Dictionary of callback States, Inputs and Outputs required by all dependent hooks. Besides the arguments required by dependent hooks, it must also containinterface_name_state (
State): The attribute that provides the interface name, e.g.,State('data-store-dropdown', 'value').