The kwargs protocol is defined as follows:
Example: assume a topic ‘someTopic’ and subtopic ‘someTopic.subTopic’:
from pubsub import pub
def listener(hi): assert msg == 123
pub.subscribe(listener, 'someTopic')
def listener2(hi, foo): assert hi == 123; assert foo = 'bar'
pub.subscribe(listener2, 'someTopic.subTopic')
pub.sendMessage('someTopic.subTopic', hi=123, foo='bar')
This protocol is defined as follows:
Example:
from pubsub import setuparg1
from pubsub import pub
def listener(msg): assert msg.data['hi'] == 123
data = dict('hi':123, ...)
pub.sendMessage('someTopic', data)