Skip to main content

The herald of python message passing between threads and processes

Project description

Heraut

Heraut, the herald of pythonic message passing.

A python 3.6+ package for message passing between threads and processes.

Minimal example:

Sending Information

from src import heraut

# Initialize the sender, once per process per sender
sender = heraut.Sender(name='process A')
# Send the message
sender.send(message='hello world', label='', target='process B')
# Tell the listner no more messages will be coming. 
sender.stop_listener(target='process B')

Recieving Information

from src import heraut

listener = heraut.Listener()
flag = True
while flag and listener.listening():
    # get the message
    flag, message, label, metadata = listener.get_message()
    # do something with the message
    print(message)
# Shut down the listner. 
listener.end()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heraut-0.0.1.dev1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

heraut-0.0.1.dev1-py3-none-any.whl (4.7 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