Subjects

Subject

class broqer.Subject[source]

Source with .emit(value) method to publish a new message.

>>> from broqer import op
>>> s = Subject()
>>> _d = s | op.Sink(print)
>>> s.emit(1)
1

Value

class broqer.Value(init)[source]

Source with a state (initialized via init)

>>> from broqer import op
>>> s = Value(0)
>>> _d = s | op.Sink(print)
0
>>> s.emit(1)
1