Lightweight ROS-like pub-sub tool utilizing ZeroMQ
Project description
Zero Message
Zero Message is a lightweight ROS-like pub-sub tool for Python 3.4+.
- Provides a wrapper around ZeroMQ socket.
- Communicate between any Python program using publisher-subscriber protocol
Installation
pip install zeromessage
Quick start
Refer to the /examples
:
# listener.py
import asyncio
from zeromessage import EnvelopSocket
socket = EnvelopSocket.as_subscriber()
def doSomething(msg):
print(msg)
subscribe_coroutine = socket.subscribe('test', doSomething)
asyncio.get_event_loop().run_until_complete(subscribe_coroutine())
# talker.py
import time
from zeromessage import EnvelopSocket
socket = EnvelopSocket.as_publisher()
while True:
socket.publish('test', {
'data': [1, 2, 3]
})
time.sleep(1)
Command Line tools
A rostopic
like tool is provided.
zerotopic echo -- --help
API Document
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zeromessage-0.2.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for zeromessage-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f0d390da7309904277aaa8a513f016a2b13c9d89c6095f5938560426a046a70 |
|
MD5 | 935a643f8a8dad2192a17d990b7dd7f4 |
|
BLAKE2b-256 | 671342dd7567c7f6f9089059f4cab2bd73337c552d73f5a270b7d62c47d60798 |