MCPcopy
hub / github.com/faif/python-patterns / notify

Method notify

patterns/behavioral/publish_subscribe.py:15–16  ·  view source on GitHub ↗
(self, msg: str)

Source from the content-addressed store, hash-verified

13 self.subscribers = {}
14
15 def notify(self, msg: str) -> None:
16 self.msg_queue.append(msg)
17
18 def subscribe(self, msg: str, subscriber: Subscriber) -> None:
19 self.subscribers.setdefault(msg, []).append(subscriber)

Callers 1

publishMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected