- class disseminate.signals.signals.Namespace¶
A mapping of signal names to signals.
- signal(name, doc=None)¶
Return a signal with the given name.
The name of the signal
The description documentation for the signal.
- class disseminate.signals.signals.Signal(name, doc=None)¶
A notification emitter.
(Inspired by blinker)
- receiversDict[int, Callable]
A dict with the order (key) for a receiver (value) to run when the signal is emitted.
- connect(receiver, order, weak=True)¶
Connect a receiver to this signal.
A function that will be executed when this signal is emitted.
The order for this receiver to be run.
If true, a weak reference will be stored for the receiver.
- connect_via(order, weak=True)¶
The decorator for connect
Emit (send) the signal and run the receiver functions.
Return a dict of receivers (values) and their orders (keys).
Reset the signal to its initial state