v1.1.7
upgrade
You can use the following sentence to upgrade the version.
pip install --upgrade broadcast-service
feat
- add decorator, optimize syntactic expression #5
- You can use the following sentences to subscribe topic
@broadcast_service.on_listen(['topic1'])
def handle_all_msg():
# your code
@broadcast_service.on_listen(['topic1','topic2'])
def handle_all_msg():
# your code
@broadcast_service.on_listen()
def handle_all_msg(*args, **kwargs):
# your code
- Add some equals function name
# send topic msg
broadcast_service.subscribe('my_topic', handle_msg)
broadcast_service.listen('my_topic', handle_msg)
broadcast_service.on('my_topic', handle_msg)
# listen topic msg
broadcast_service.broadcast('my_topic', info)
broadcast_service.publish('my_topic', info)
broadcast_service.emit('my_topic', info)
test
- optimize tests and add some demo #5