This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

muppet is Python implementation of mutual. muppet provides RemoteChannel for simple messaging across process or machine boundaries and DurableChannel for durable messaging across process or machine boundaries. Both RemoteChannel and DurableChannel use Redis for message store.

Remote Channel

Remote Channel follows a pub-sub model where every message sent on a channel is broadcast to all the subscribers listening on the channel.

Usage:

from muppet import RemoteChannel

# define the callback to receive messages
def callback(message):
  print("received:", message)
  # we are done with the receiver
  receiver.end()

# redis server details
redis_options = {"redis": {"host": "127.0.0.1", "port": 6379}}
# create a remote channel to send messages
sender = RemoteChannel("greeting", redis_options)
# create a remote channel to receive messages
receiver = RemoteChannel("greeting", redis_options)
# listen for messages by passing the callback
receiver.listen(callback)
# send a message
sender.send("hello")
# we are done with the sender
sender.end()

Durable Channel

Durable Channel follows a queue model, where a message sent on a channel is picked up by any one of the receivers listening on the channel. Using DurableChannel, senders can send messages with a timeout, so they are informed when a message is not replied to within the specified timeout. Every message is guaranteed to be replied to within a specified timeout, if not, sender is informed via a callback.

Usage:

from muppet import DurableChannel

def timeout_callback(message):
  print "timed out:", message
  # we are done with the worker
  worker.end()
  # we are done with dispatcher
  dispatcher.end()

# redis server details
redis_options = {"redis": {"host": "127.0.0.1", "port": 6379}}
# create a durable channel to dispatch messages
dispatcher = DurableChannel("dispatcher.1", redis_options)
# create a durable channel to receive messages, note the 3rd argument which is the callback for handling timeouts
worker = DurableChannel("worker.1", redis_options, timeout_callback)

# dispatch a message to worker.1
dispatcher.send(content="task", to="worker.1")

# receive the message
message = worker.receive()
print "received message:", message["content"]
# reply to the message
worker.reply(message=message, response="reply", timeout=5000)

# receive the reply
reply = dispatcher.receive()
print "received reply:", reply["content"]

# we are happy with the reply
dispatcher.close(reply)

# we are done with dispatcher and worker
worker.end()
dispatcher.end()
Release History

Release History

0.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
muppet-0.1.6.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source May 28, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting