{ "info": { "author": "ICON foundation", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Earlgrey\n\nEarlgrey is a python library which provides a convenient way to publish and consume messages between processes using RabbitMQ. It is abstracted to RPC pattern.\n\n## How to use\n```python\n# RPC methods\nclass Task:\n @message_queue_task\n async def echo(self, value):\n return value\n\n# Client stub\nclass Stub(MessageQueueStub[Task]):\n TaskType = Task\n\n# Server service\nclass Service(MessageQueueService[Task]):\n TaskType = Task\n\nasync def run():\n route_key = 'any same string between processes'\n\n client = Stub('localhost', route_key)\n server = Service('localhost', route_key)\n\n await client.connect()\n await server.connect()\n\n result = await client.async_task().echo('any value')\n print(result) # 'any value'\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(run())\n\n```\n\n\n#### Caution\nActually `MessageQueueStub` does not need exact `Task` class which has full implementation of methods. It just needs signature of methods.\n```python\n# client side.\nclass Task:\n @message_queue_task\n async def echo(self, value):\n # Just signature. It is okay. Do not need implemetation.\n # But server must have its implementation\n pass\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/icon-project/earlgrey", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "earlgrey", "package_url": "https://pypi.org/project/earlgrey/", "platform": "", "project_url": "https://pypi.org/project/earlgrey/", "project_urls": { "Homepage": "https://github.com/icon-project/earlgrey" }, "release_url": "https://pypi.org/project/earlgrey/0.0.4/", "requires_dist": [ "aio-pika (==3.0.1)", "pika (==0.12.0)" ], "requires_python": "", "summary": "Python AMQP RPC library", "version": "0.0.4" }, "last_serial": 4195274, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "86f0b6eb8df561fdb19357d249aff995", "sha256": "86ee6970a8a120c3f6de2b1fba4383131813e04f94062eb36f3139c79305c3d6" }, "downloads": -1, "filename": "earlgrey-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "86f0b6eb8df561fdb19357d249aff995", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20538, "upload_time": "2018-08-22T06:54:14", "url": "https://files.pythonhosted.org/packages/0e/8c/da980b4d027a22bd235328d2414bf3e3a8437eea9e6351ccc7791ea919f5/earlgrey-0.0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86f0b6eb8df561fdb19357d249aff995", "sha256": "86ee6970a8a120c3f6de2b1fba4383131813e04f94062eb36f3139c79305c3d6" }, "downloads": -1, "filename": "earlgrey-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "86f0b6eb8df561fdb19357d249aff995", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20538, "upload_time": "2018-08-22T06:54:14", "url": "https://files.pythonhosted.org/packages/0e/8c/da980b4d027a22bd235328d2414bf3e3a8437eea9e6351ccc7791ea919f5/earlgrey-0.0.4-py3-none-any.whl" } ] }