snsary.sources.multi_source

Manually subscribing each Source to each Output is repetitive, especially when there are multiple Outputs. MultiSource combines multiple Sources as one. Just like a Sensor, a MultiSource also exposes a stream to make it easier to work with:

MultiSource(MockSensor(), MockSensor()).stream.into(MockOutput())

Module Contents

class snsary.sources.multi_source.MultiSource(*sources)

Bases: snsary.sources.source.Source

property stream
subscribe(output)