flowbber.components.aggregator

Module implementating the Aggregator base class.

All custom Flowbber aggregators must extend from the Aggregator class.

Classes

  • Aggregator: Main base class to implement an Aggregator.
class flowbber.components.aggregator.Aggregator(index, type_, id_, optional=False, timeout=None, config=None)

Main base class to implement an Aggregator.

Inheritance

Inheritance diagram of Aggregator

accumulate(data)

Perform analysis or accumulate from the given data.

The aggregator can:

  1. Add values:

    data['some_key'] = {'value': 1000}
    
  2. Delete values:

    del data['some_key']
    
  3. Modify values:

    data['some_key']['value'] = 2000
    

All aggregators subclasses must implement this abstract method.

Parameters
data (OrderedDict) – The data collected by the sources. Any modifications performed will be reflected on the final collected data.