Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/faif/python-patterns
/ subscribe
Method
subscribe
patterns/behavioral/publish_subscribe.py:44–45 ·
view source on GitHub ↗
(self, msg: str)
Source
from the content-addressed store, hash-verified
42
self.provider = msg_center
43
44
def
subscribe(self, msg: str) -> None:
45
self.provider.subscribe(msg, self)
46
47
def
unsubscribe(self, msg: str) -> None:
48
self.provider.unsubscribe(msg, self)
Callers
3
test_subscriber_shall_be_attachable_to_subscriptions
Method · 0.95
test_subscriber_shall_be_detachable_from_subscriptions
Method · 0.95
test_provider_shall_update_affected_subscribers_with_published_subscription
Method · 0.95
Calls
1
subscribe
Method · 0.45
Tested by
3
test_subscriber_shall_be_attachable_to_subscriptions
Method · 0.76
test_subscriber_shall_be_detachable_from_subscriptions
Method · 0.76
test_provider_shall_update_affected_subscribers_with_published_subscription
Method · 0.76