shyft.dashboard.time_series.sources.ts_adapter

Classes

BasicTsAdapter(data, unit_registry, unit)

This class is the most basic implementation of a TsAdapter which takes a TimeSeries and returns its evaluation when called

TsAdapter()

This object defines the data for a data source.

class shyft.dashboard.time_series.sources.ts_adapter.TsAdapter[source]

Bases: ABC

This object defines the data for a data source. With the __call__ data for a given time axis and unit can be provided to be viewed by the ts viewer. The call method must return a Unit annotated TsVector with the time series to show.

abstractmethod __call__(*, time_axis: TimeAxis, unit: str | Unit) Quantity[TsVector][source]

Call self as a function.

class shyft.dashboard.time_series.sources.ts_adapter.BasicTsAdapter(data: TimeSeries | TsVector | Quantity, unit_registry, unit: str)[source]

Bases: TsAdapter

This class is the most basic implementation of a TsAdapter which takes a TimeSeries and returns its evaluation when called

__init__(data: TimeSeries | TsVector | Quantity, unit_registry, unit: str)[source]
__call__(*, time_axis: TimeAxis, unit: str | Unit) Quantity[TsVector][source]

Call self as a function.