Skip to main content

Lightweight ROS-like pub-sub tool utilizing ZeroMQ

Project description

Zero Message

Documentation Status

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

zero-message.readthedocs.io

Project details


Release history Release notifications | RSS feed

This version

0.2

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)

Uploaded Source

Built Distribution

zeromessage-0.2-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page