tspy.data_structures.stream_time_series.ObservationStream module¶
-
class
tspy.data_structures.stream_time_series.ObservationStream.
ObservationStream
(tsc, j_observation_stream)¶ Bases:
object
A queue of observations that can be accessed in a streaming manner
Methods
peek
()Peek with non-blocking for the most recent observation.
poll
([polling_interval])Poll with blocking for the most recent observation and remove that observation from the queue.
-
peek
()¶ Peek with non-blocking for the most recent observation. If no observation exists, return None.
- Returns
Observation
the next observation
-
poll
(polling_interval=1000)¶ Poll with blocking for the most recent observation and remove that observation from the queue. If no observation exists, poll will be called every polling_interval milliseconds.
- Parameters
- polling_intervalint, optional
how often to check for a new Observation til one is returned (default is 1000)
- Returns
Observation
the next observation
-