{ "info": { "author": "scnerd", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "easyrabbit\n==========\n\n|Coverage Status| |Build Status| |Doc Status|\n\nActually easy RabbitMQ utilities for common tasks. Hides the\ncomplexities of complete control packages like ``pika`` by wrapping\ncommon use cases in minimalistic wrappers.\n\nInstallation\n============\n\nYou can install directly from Pypi::\n\n pip install easyrabbit\n\nor from git using pip::\n\n pip install git+https://github.com/scnerd/easyrabbit\n\nUsage\n=====\n\nSimple routing\n--------------\n\nReader\n~~~~~~\n\n``RoutingReader`` provides a fully asynchronous way to read from an\nexchange via a queue bound with a routing key. It launches a subprocess\nto free the calling program from being responsible for its computational\noverhead; within its own process, it uses ``pika``'s asynchronous\nconnection, enabling the highest possible performance client. The API\nexposed mimics a simple queue, if, after all, what you really want is to\nuse a RabbitMQ queue as if it were a Python queue.\n\n.. code:: python\n\n with RoutingReader(url, exchange, queue_name, routing_key) as reader:\n for msg in reader:\n print(\"Received the following message: {}\".format(msg))\n\nIf the reader is needed persistently, you can also launch and terminate\nit yourself:\n\n.. code:: python\n\n reader = RoutingReader(url, exchange, queue_name, routing_key)\n reader.start()\n # Do things with the reader\n reader.close()\n\nNote that even though the reader is asynchronous, you don't need to wait\nfor it to be ready before using it. All calls hang on the process pipe\nthat sends data from the client process to your parent code. If you want\nto make sure that the connection is fully established before using it,\nhowever, you can use ``wait_till_ready``:\n\n.. code:: python\n\n reader = RoutingReader(url, exchange, queue_name, routing_key)\n reader.start()\n try:\n reader.wait_till_ready(timeout=5)\n except TimeoutError:\n raise RuntimeError(\"RabbitMQ reader took more than 5 seconds to launch\")\n\nWhile ``reader.get`` is blocking, a non-blocking equivalent is\n``reader.get_nowait``, or your code can explicitly check that a value is\navailable first using ``not reader.empty()``. Iterating over ``reader``\njust repeatedly calls ``get``, and hence is blocking and will only end\nwhen the reader is closed. Use ``reader.getall_nowait()`` to obtain all\nvalues currently in the queue.\n\nAll result objects are byte arrays.\n\nWriting\n~~~~~~~\n\nThe analogous utility for writing is ``RoutingWriter``, which provides a\nnearly identical interface for writing messages to RabbitMQ\n\n.. code:: python\n\n with RoutingWriter(url, exchange, routing_key) as writer:\n for msg in msgs:\n writer.put(msg)\n\n``RoutingWriter`` exposes much the same API as ``RoutingReader``, except\nof course exposing ``put`` instead of ``get``.\n\n.. |Coverage Status| image:: https://coveralls.io/repos/github/scnerd/easyrabbit/badge.svg?branch=master\n :target: https://coveralls.io/github/scnerd/easyrabbit?branch=master\n.. |Build Status| image:: https://travis-ci.org/scnerd/easyrabbit.svg?branch=master\n :target: https://travis-ci.org/scnerd/easyrabbit\n.. |Doc Status| image:: https://readthedocs.org/projects/easyrabbit/badge/?version=latest\n :target: http://easyrabbit.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scnerd/easyrabbit", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "easyrabbit", "package_url": "https://pypi.org/project/easyrabbit/", "platform": "", "project_url": "https://pypi.org/project/easyrabbit/", "project_urls": { "Homepage": "https://github.com/scnerd/easyrabbit" }, "release_url": "https://pypi.org/project/easyrabbit/0.0.3/", "requires_dist": [ "pika (>=0.10)" ], "requires_python": "", "summary": "Easy utilities for common RabbitMQ tasks", "version": "0.0.3" }, "last_serial": 3622672, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "7e3a204551053ffe4c288899ccafc941", "sha256": "22110ba0713b747e135e55f2bbc82ecf14dc552b69a2d5aa0adab5fe06a40c8d" }, "downloads": -1, "filename": "easyrabbit-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7e3a204551053ffe4c288899ccafc941", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4597, "upload_time": "2018-02-16T19:50:54", "url": "https://files.pythonhosted.org/packages/d0/87/7b1769c69c0a6d82d722297e8a6471b78201b0a0a035b644436df777a999/easyrabbit-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2d67c3ea60b4106c5973ce50f857184", "sha256": "3422ceebc202e08113ed9d14c0bc744ea9fb6a48c120e7f4b2a1b52426603df7" }, "downloads": -1, "filename": "easyrabbit-0.0.0.tar.gz", "has_sig": false, "md5_digest": "d2d67c3ea60b4106c5973ce50f857184", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4486, "upload_time": "2018-02-16T19:50:56", "url": "https://files.pythonhosted.org/packages/50/93/f30fbf35bf1731b8edfa09ebfecbddfd46453e7f60358d1793413bc0cefa/easyrabbit-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "f7ab8bebcffe47a8488e66796ab02edd", "sha256": "3ddb66310ad4a16c8c32e21bf1cd7d0217cef9155622774c7a39b034ee7aa324" }, "downloads": -1, "filename": "easyrabbit-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f7ab8bebcffe47a8488e66796ab02edd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7155, "upload_time": "2018-02-16T19:57:15", "url": "https://files.pythonhosted.org/packages/13/6a/4c4f828fec59224d2b9f584693845936dd10dc71ecf7fe71248877ae7c37/easyrabbit-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bba3ea64006978e95afc48bb2fca1424", "sha256": "cbc997c9e16250373b58efe660422b9b02e21ae63643d672caa56e69e54daa58" }, "downloads": -1, "filename": "easyrabbit-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bba3ea64006978e95afc48bb2fca1424", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4720, "upload_time": "2018-02-16T19:57:17", "url": "https://files.pythonhosted.org/packages/bf/3d/be6ea3541b80d0d66d0bb0983658e449446b2fe878d24470b3725ac23606/easyrabbit-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "ba1fbfbd72b2a3063140b12c55aad76f", "sha256": "f52a58d0eb98b1700ddaa9f3052c91ceb7a0d06be84ce512fa586e8e09cc7f7a" }, "downloads": -1, "filename": "easyrabbit-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ba1fbfbd72b2a3063140b12c55aad76f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7275, "upload_time": "2018-02-16T20:02:32", "url": "https://files.pythonhosted.org/packages/c5/cb/04eb06be779cd6e77090e262a703a435c836284fbcc993faf0b26670ef5e/easyrabbit-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "831039fd4f55dfa3918d8fdbbbee10c8", "sha256": "4ae142f60131ee63d0576134344f19385713cf11a55d0805c8ae3fd0ac622a3f" }, "downloads": -1, "filename": "easyrabbit-0.0.2.tar.gz", "has_sig": false, "md5_digest": "831039fd4f55dfa3918d8fdbbbee10c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4862, "upload_time": "2018-02-16T20:02:34", "url": "https://files.pythonhosted.org/packages/2a/68/6c7398956b0fe419c0c7775f2b56a58bc425d5a6f354e91018080c7c8d3a/easyrabbit-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "deb06ebefd9b3af7e8eb51cedfd2403e", "sha256": "9415c6a1af8aadff1541ed917fc45c3733ab90e35926abad67f05dbb172a9a72" }, "downloads": -1, "filename": "easyrabbit-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "deb06ebefd9b3af7e8eb51cedfd2403e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7643, "upload_time": "2018-02-27T18:54:36", "url": "https://files.pythonhosted.org/packages/c0/b0/ad7c7b57ca25919a16d70fa31d373646ba450f023589efde66e97e07206d/easyrabbit-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3771c4d74d56761626a3b70071b98977", "sha256": "6c719d1b23f95bf33072eebb6c1f0a8e9763293f60da6298ba5b6142b4cd2b3e" }, "downloads": -1, "filename": "easyrabbit-0.0.3.tar.gz", "has_sig": false, "md5_digest": "3771c4d74d56761626a3b70071b98977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5178, "upload_time": "2018-02-27T18:54:38", "url": "https://files.pythonhosted.org/packages/34/68/224d7fabdaf78dd00eacc1d33ee12d1be84c25b24a7d779928ea7a7501be/easyrabbit-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "deb06ebefd9b3af7e8eb51cedfd2403e", "sha256": "9415c6a1af8aadff1541ed917fc45c3733ab90e35926abad67f05dbb172a9a72" }, "downloads": -1, "filename": "easyrabbit-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "deb06ebefd9b3af7e8eb51cedfd2403e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7643, "upload_time": "2018-02-27T18:54:36", "url": "https://files.pythonhosted.org/packages/c0/b0/ad7c7b57ca25919a16d70fa31d373646ba450f023589efde66e97e07206d/easyrabbit-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3771c4d74d56761626a3b70071b98977", "sha256": "6c719d1b23f95bf33072eebb6c1f0a8e9763293f60da6298ba5b6142b4cd2b3e" }, "downloads": -1, "filename": "easyrabbit-0.0.3.tar.gz", "has_sig": false, "md5_digest": "3771c4d74d56761626a3b70071b98977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5178, "upload_time": "2018-02-27T18:54:38", "url": "https://files.pythonhosted.org/packages/34/68/224d7fabdaf78dd00eacc1d33ee12d1be84c25b24a7d779928ea7a7501be/easyrabbit-0.0.3.tar.gz" } ] }