Skip to content
Select products...

Listening for Changes

The Volue Insight Timeseries API supports listening for changes to curves. An event listener behaves like an infinite iterator, returning change events as they happen.

Find a list of curves (or curve IDs) and pass them to session.events(). Two optional arguments are available:

  • start_time — resume a listener without receiving old events
  • timeout — stop waiting after the specified number of seconds

When a curve is updated, the iterator yields a CurveEvent object. If timeout is specified and expires, an EventTimeout object is returned.

>>> curves = session.search(category='WND', area=['EE', 'LT'], frequency='H')
>>> events = session.events(curves, timeout=5)
>>> for e in events:
... print(e)

See the listening for changes example for a complete script that appends new data to a CSV file on each event.