{ "info": { "author": "Brandon Schlueter", "author_email": "pika-consumer@schlueter.blue", "bugtrack_url": null, "classifiers": [ "Environment :: OpenStack", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "pika-consumer\n=============\nBecause there isn't one distributed with pika\n\nAn easy to use pika consumer based on the example pika asynchronous consumer. It probably works with versions of python besides 3.6, but it hasn't been tested.\n\nUse\n---\n\nWith this module installed, simply extend the *pika_consumer.Consumer* class and override its *on_message* method. The *acknowledge_message* method should be called in the overriden method:\n\n\n.. code:: python\n\n from pika_consumer import Consumer\n\n def consume_message(body):\n # do stuff with the message body\n\n class ExampleConsumer(Consumer):\n\n def on_message(self, channel, basic_deliver, properties, body):\n consume_message(body)\n self.acknowledge_message(basic_deliver.delivery_tag)\n\nThen set the consumer consuming:\n\n.. code:: python\n\n amqp_url = 'amqp://user:name@rabbit_host:5672/%2F'\n queue = 'your_queue'\n routing_key = 'your_routing_key'\n exchange = 'your_exchange'\n consumer = ExampleConsumer(amqp_url, queue, routing_key, exchange)\n consumer.consume()\n\nExample\n-------\n\nRunning `vagrant up` will create a VM running rabbitmq and python 3.6 running an example consumer which will populate a file in the repo, *example.log* upon running\n\n.. code:: sh\n\n vagrant ssh -c '/usr/local/lib/pyenv/versions/3.6.0/bin/python /vagrant/bin/example_publisher.py'\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/schlueter/pika-consumer", "keywords": "", "license": "GNU Affero General Public License v3 or later (AGPLv3+)", "maintainer": "", "maintainer_email": "", "name": "Pika-Consumer", "package_url": "https://pypi.org/project/Pika-Consumer/", "platform": "", "project_url": "https://pypi.org/project/Pika-Consumer/", "project_urls": { "Homepage": "http://github.com/schlueter/pika-consumer" }, "release_url": "https://pypi.org/project/Pika-Consumer/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "A pika consumer class which may be used to create rabbitmq queue consumers", "version": "0.0.5" }, "last_serial": 2670211, "releases": { "0.0.1.dev5": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7689065e59ccf22073e42f770a41c836", "sha256": "9e63c147d17451c33f0000593acdbb40c5dd76248a303e48e970767d3113d802" }, "downloads": -1, "filename": "Pika Consumer-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7689065e59ccf22073e42f770a41c836", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14815, "upload_time": "2017-02-27T05:49:33", "url": "https://files.pythonhosted.org/packages/0d/24/23ebe3dceb87fdbb4ad4c3df139285ce30fce88c2b3e11c151bf12f62666/Pika%20Consumer-0.0.2.tar.gz" } ], "0.0.3.dev1": [], "0.0.3.dev2": [ { "comment_text": "", "digests": { "md5": "1fbcbbe68b64fc1ab174218dc3b9f61b", "sha256": "ed92d88b53983977f509dbcaa49dd3b95b121db63d29652bcd62f78bb528da83" }, "downloads": -1, "filename": "Pika Consumer-0.0.3.dev2.tar.gz", "has_sig": false, "md5_digest": "1fbcbbe68b64fc1ab174218dc3b9f61b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14940, "upload_time": "2017-02-27T06:20:07", "url": "https://files.pythonhosted.org/packages/d8/76/3052a1ab6b7bf7cf6ab6e34853fc9f4a9d0b9b44c12371cb54b1449a6dab/Pika%20Consumer-0.0.3.dev2.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "7b029cfeca3e31b8f0887332f411964c", "sha256": "1500d9cd860527b6a6ac3164df815e963fd2bda812a9201b4b4c12c5eb157f05" }, "downloads": -1, "filename": "Pika Consumer-0.0.4.tar.gz", "has_sig": false, "md5_digest": "7b029cfeca3e31b8f0887332f411964c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14876, "upload_time": "2017-02-27T06:26:08", "url": "https://files.pythonhosted.org/packages/c7/b5/627834ece9641122561ba83bd74be738b51b3ccf957676d2eda99e8f0980/Pika%20Consumer-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "cc458c9092e3e2bba796db2b35306160", "sha256": "09a62f66d9a6130eca940037bf8108cbf334f34e71d77ff6f4003de3bbd7f54c" }, "downloads": -1, "filename": "pika-consumer-0.0.5.tar.gz", "has_sig": false, "md5_digest": "cc458c9092e3e2bba796db2b35306160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15375, "upload_time": "2017-02-27T06:30:29", "url": "https://files.pythonhosted.org/packages/d5/8b/1273ba801089ed800d3f66af4c310adebe21a0add058e9d7c1f5165d2001/pika-consumer-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cc458c9092e3e2bba796db2b35306160", "sha256": "09a62f66d9a6130eca940037bf8108cbf334f34e71d77ff6f4003de3bbd7f54c" }, "downloads": -1, "filename": "pika-consumer-0.0.5.tar.gz", "has_sig": false, "md5_digest": "cc458c9092e3e2bba796db2b35306160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15375, "upload_time": "2017-02-27T06:30:29", "url": "https://files.pythonhosted.org/packages/d5/8b/1273ba801089ed800d3f66af4c310adebe21a0add058e9d7c1f5165d2001/pika-consumer-0.0.5.tar.gz" } ] }