shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions

Functions

check_dtss_url(host_port)

This function evaluates if the url belogns to a running dts server :param host_port: url of dtss like localhost:20000

detect_unit_of(url)

Just a helper to illustrate multiple axis based on unit

find_all_ts_names_and_url(*, host_port, ...)

This function returns a list of time series names and urls for each Time Series in the container of the dtss at the ts_url.

try_dtss_connection(host_port)

This function evaluates if the url belogs to a running dts server :param host_port: url of dtss like localhost:20000

Classes

DtssTsAdapter(dtss_url, ts_url[, unit])

A very primitive synchronous dtss adapter to keep it simple

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.check_dtss_url(host_port: str) bool[source]

This function evaluates if the url belogns to a running dts server :param host_port: url of dtss like localhost:20000

Return type:

True if dtss reachable with given url, False if not

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.try_dtss_connection(host_port: str) bool[source]

This function evaluates if the url belogs to a running dts server :param host_port: url of dtss like localhost:20000

Return type:

True if dtss reachable with given url

Raises:

RuntimeError if no dtss can be found under given url

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.detect_unit_of(url: str) str[source]

Just a helper to illustrate multiple axis based on unit

shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.find_all_ts_names_and_url(*, host_port: str, container: str, pattern: str) List[Tuple[str, str]][source]

This function returns a list of time series names and urls for each Time Series in the container of the dtss at the ts_url.

Parameters:
  • host_port – host_port to dtss

  • container – dtss data container to search in

  • pattern – what time-series to match, regular expression

Return type:

List of Tuple with (ts_url, name) for each ts in the container

Raises:

RuntimeError if no dtss can be found under given url

class shyft.dashboard.apps.dtss_viewer.dtsc_helper_functions.DtssTsAdapter(dtss_url: str, ts_url: str, unit: str = '')[source]

Bases: TsAdapter

A very primitive synchronous dtss adapter to keep it simple

__init__(dtss_url: str, ts_url: str, unit: str = '') None[source]
__call__(*, time_axis: ~shyft.time_series._time_series.TimeAxis, unit: str | ~pint.unit.build_unit_class.<locals>.Unit) Quantity[TsVector][source]

Call self as a function.