RealTimeSeries is designed to be highly customizable. If you need to connect to a data source that is not included in the predefined options, you can extend the application to support custom data import methods. Detailed instructions:
- Go to ConnectionWidgets.py. You need to make changes there in order to build a custom import method.
- Structure of the Connector:
- The connector should be a python class, stored in this folder.
- The connector should have four attributes:
__init__(*init_connection_parameters)
: The__init__
function.connect(*connect_parameters)
: The method to connect. This should return a booleanTrue
orFalse
based on the connection status.get_schema(*get_schema_parameters)
: Returns a tuple containing:status
(bool)column_names
(list)
import_data(*import_data_parameters)
: return a generator object for the data.
- Don't forget to wrap all the relevant widgets in a widget bunch, which will be used later.
- The input parameters are Holoviz Panel widgets with the
value
attribute as parameters OR any other entity not having avalue
attribute.
- Add a watcher function in the syntax:
self.your_custom_import_button_widget.on_click(lambda event: self.__combined_connector(
Method.Connection,
init_param_list,
connect_param_list,
get_schema_param_list,
import_data_param_list,
self.your_custom_import_button_widget
))
- Add your widget bunch to the accordion as a tuple, with the first element as the display name. For example:
('Display Name', widget_bunch)
PLEASE SEE ConnectionWidgets.py FOR FURTHER DETAILS