{ "info": { "author": "Daniel Yoder, Mahesh Yellai", "author_email": "daniel.yoder@gmail.com, mahesh.yellai@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "******\nmuppet\n******\n\n`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.\n\n.. _muppet: http://github.com/pandastrike/muppet\n.. _mutual: http://github.com/pandastrike/mutual\n\n\nRemote Channel\n--------------\nRemote Channel follows a pub-sub model where every message sent on a channel is broadcast to all the subscribers listening on the channel.\n\nUsage:\n^^^^^^\n\n.. code-block:: python\n\n from muppet import RemoteChannel\n\n # define the callback to receive messages\n def callback(message):\n print(\"received:\", message)\n # we are done with the receiver\n receiver.end()\n\n # redis server details\n redis_options = {\"redis\": {\"host\": \"127.0.0.1\", \"port\": 6379}}\n # create a remote channel to send messages\n sender = RemoteChannel(\"greeting\", redis_options)\n # create a remote channel to receive messages\n receiver = RemoteChannel(\"greeting\", redis_options)\n # listen for messages by passing the callback\n receiver.listen(callback)\n # send a message\n sender.send(\"hello\")\n # we are done with the sender \n sender.end()\n\n\nDurable Channel\n---------------\nDurable 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.\n\nUsage:\n^^^^^^\n\n.. code-block:: python\n\n from muppet import DurableChannel\n\n def timeout_callback(message):\n print \"timed out:\", message\n # we are done with the worker\n worker.end()\n # we are done with dispatcher\n dispatcher.end()\n\n # redis server details\n redis_options = {\"redis\": {\"host\": \"127.0.0.1\", \"port\": 6379}}\n # create a durable channel to dispatch messages\n dispatcher = DurableChannel(\"dispatcher.1\", redis_options)\n # create a durable channel to receive messages, note the 3rd argument which is the callback for handling timeouts\n worker = DurableChannel(\"worker.1\", redis_options, timeout_callback)\n\n # dispatch a message to worker.1\n dispatcher.send(content=\"task\", to=\"worker.1\")\n\n # receive the message\n message = worker.receive()\n print \"received message:\", message[\"content\"]\n # reply to the message\n worker.reply(message=message, response=\"reply\", timeout=5000)\n\n # receive the reply\n reply = dispatcher.receive()\n print \"received reply:\", reply[\"content\"]\n \n # we are happy with the reply\n dispatcher.close(reply)\n\n # we are done with dispatcher and worker\n worker.end()\n dispatcher.end()", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pandastrike/muppet", "keywords": "Durable messaging,Distributed processing,Redis", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "muppet", "package_url": "https://pypi.org/project/muppet/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/muppet/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/pandastrike/muppet" }, "release_url": "https://pypi.org/project/muppet/0.1.6/", "requires_dist": null, "requires_python": null, "summary": "Durable messaging for distributed processing", "version": "0.1.6" }, "last_serial": 1106749, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "9409d4a32b2b00a69678ec4b5f613d25", "sha256": "60fa1d56e9ff5a47c33f70e04a088edea187f2d7810208271014587399f0b87a" }, "downloads": -1, "filename": "muppet-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9409d4a32b2b00a69678ec4b5f613d25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5071, "upload_time": "2014-04-17T12:05:48", "url": "https://files.pythonhosted.org/packages/04/c7/e7e19ea86e49739cd326acd2461adada9103a0f4e62deb7a57aac2ccf1b0/muppet-0.1.2.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "493cb6c3e600dcc2c7ca17d2f01e44fa", "sha256": "be76676d6a9328466059b31b97b11b630c0166d0660dba286d96ffd9a2ed706c" }, "downloads": -1, "filename": "muppet-0.1.4.tar.gz", "has_sig": false, "md5_digest": "493cb6c3e600dcc2c7ca17d2f01e44fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5156, "upload_time": "2014-04-17T12:52:59", "url": "https://files.pythonhosted.org/packages/eb/45/b283f5039a884c5e0992d22b7ad136ecf688a7774603fd729c92b7e1c589/muppet-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "b4ed5e647d7923acbe7dc2f6bf244917", "sha256": "e8391c594a27feedbd94b6d2f6e25c2fd865a034822be983d7fec06f17146f0a" }, "downloads": -1, "filename": "muppet-0.1.5.tar.gz", "has_sig": true, "md5_digest": "b4ed5e647d7923acbe7dc2f6bf244917", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5160, "upload_time": "2014-04-18T04:52:04", "url": "https://files.pythonhosted.org/packages/7e/52/66186417e616fa06f2003618c1cbf5facef1b3127a664b3de3187d8b100b/muppet-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "d7954473ea15d60dedd51e743df381ee", "sha256": "705cbb73d037cb57072c011083caef5d20eb22fb19cce6e94fe3c225ea1c3494" }, "downloads": -1, "filename": "muppet-0.1.6.tar.gz", "has_sig": true, "md5_digest": "d7954473ea15d60dedd51e743df381ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4338, "upload_time": "2014-05-28T15:08:29", "url": "https://files.pythonhosted.org/packages/f1/34/d2e0922acb70d7c53cd26231bc88d2dc95c276e1dcb10a17e2b702f15343/muppet-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7954473ea15d60dedd51e743df381ee", "sha256": "705cbb73d037cb57072c011083caef5d20eb22fb19cce6e94fe3c225ea1c3494" }, "downloads": -1, "filename": "muppet-0.1.6.tar.gz", "has_sig": true, "md5_digest": "d7954473ea15d60dedd51e743df381ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4338, "upload_time": "2014-05-28T15:08:29", "url": "https://files.pythonhosted.org/packages/f1/34/d2e0922acb70d7c53cd26231bc88d2dc95c276e1dcb10a17e2b702f15343/muppet-0.1.6.tar.gz" } ] }