{ "info": { "author": "Wang Haowei", "author_email": "hwwangwang@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development", "Topic :: Software Development :: Libraries" ], "description": "aiothrift\n=========\n\nAsyncio implementation for thrift protocol, which is heavily based on thriftpy_.\n\n.. image:: https://travis-ci.org/ryanwang520/aiothrift.svg?branch=master\n :target: https://travis-ci.org/ryanwang520/aiothrift\n\n\nDocumentation: https://aiothrift.readthedocs.org/\n\nInstallation\n------------\n\n::\n\n $ pip install aiothrift\n\n\nUsage example\n-------------\n\nThrift file\n^^^^^^^^^^^\n\n::\n\n service PingPong {\n string ping(),\n i64 add(1:i32 a, 2:i64 b),\n }\n\n\nServer\n^^^^^^\n\n.. code:: python\n\n import asyncio\n import thriftpy\n from aiothrift.server import create_server\n\n pingpong_thrift = thriftpy.load('pingpong.thrift', module_name='pingpong_thrift')\n\n class Dispatcher:\n def ping(self):\n return \"pong\"\n\n async def add(self, a, b):\n await asyncio.sleep(1)\n return a + b\n\n loop = asyncio.get_event_loop()\n server = loop.run_until_complete(\n create_server(pingpong_thrift.PingPong, Dispatcher(), loop=loop))\n try:\n loop.run_forever()\n except KeyboardInterrupt:\n pass\n server.close()\n loop.run_until_complete(server.wait_closed())\n loop.close()\n\nClient\n^^^^^^\n\n.. code:: python\n\n import thriftpy\n import asyncio\n import aiothrift\n\n loop = asyncio.get_event_loop()\n pingpong_thrift = thriftpy.load('pingpong.thrift', module_name='pingpong_thrift')\n\n async def go():\n conn = await aiothrift.create_connection(pingpong_thrift.PingPong, loop=loop)\n print(await conn.ping())\n print(await conn.add(5, 6))\n conn.close()\n\n loop.run_until_complete(go())\n loop.close()\n\nOr use ConnectionPool\n^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n import thriftpy\n import asyncio\n import aiothrift\n\n loop = asyncio.get_event_loop()\n pingpong_thrift = thriftpy.load('pingpong.thrift', module_name='pingpong_thrift')\n\n async def go():\n pool = await aiothrift.create_pool(pingpong_thrift.PingPong, loop=loop)\n async with pool.get() as conn:\n print(await conn.ping())\n print(await conn.add(5, 6))\n pool.close()\n await pool.wait_closed()\n\n loop.run_until_complete(go())\n loop.close()\n\n\nIt's just that simple to begin with ``aiothrift``, and you are not forced to use ``aiothrift`` on both server and client side.\nSo if you already have a normal thrift server setup, feel free to create an async thrift client to communicate with that server.\n\nRequirements\n------------\n\n- Python >= 3.4.2\n- async-timeout_\n- thriftpy_\n\n.. _async-timeout: https://pypi.python.org/pypi/async_timeout\n.. _thriftpy: https://thriftpy.readthedocs.org/en/latest/\n\n\nLICENSE\n-------\n\n``aiothrift`` is offered under the MIT license.\n\n\nChangelog\n=========\n\nHere you can see the full list of changes between each ``aiothrift`` release.\n\nVersion 0.1\n-----------\n\nFirst public release.\n\nVersion 0.1.1\n-----------\n\nallow kyeword arguments to `create_server`\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/moonshadow/aiothrift/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aiothrift", "package_url": "https://pypi.org/project/aiothrift/", "platform": "POSIX", "project_url": "https://pypi.org/project/aiothrift/", "project_urls": { "Homepage": "http://github.com/moonshadow/aiothrift/" }, "release_url": "https://pypi.org/project/aiothrift/0.1.1/", "requires_dist": [ "async-timeout (>=1.1.0)", "thriftpy (>=0.3.9)" ], "requires_python": "", "summary": "async thrift server and client", "version": "0.1.1" }, "last_serial": 3757599, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "6c5f72130dfd037f5c60c0e8f8158e80", "sha256": "7ca7308553945fc9b1a06a63f4506cec9dfbb01010cc9930b2367dfddb77bfad" }, "downloads": -1, "filename": "aiothrift-0.0.0.tar.gz", "has_sig": false, "md5_digest": "6c5f72130dfd037f5c60c0e8f8158e80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8133, "upload_time": "2017-01-11T07:42:32", "url": "https://files.pythonhosted.org/packages/38/03/0db5d9f559024fa03b3aa055e8477d55f0f03e0a638f13b35f7412b40b40/aiothrift-0.0.0.tar.gz" } ], "0.0.0.1": [ { "comment_text": "", "digests": { "md5": "ef60695bfffd6e9ad67cc773bf20f83a", "sha256": "c7c605ca3b0adb270da108759c7b965746b86a2f59f68125d3ad64e2cf29ed35" }, "downloads": -1, "filename": "aiothrift-0.0.0.1.tar.gz", "has_sig": false, "md5_digest": "ef60695bfffd6e9ad67cc773bf20f83a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8131, "upload_time": "2017-01-11T07:45:45", "url": "https://files.pythonhosted.org/packages/19/22/abde4cdd29e2057c3f3cd58140ec624ed2d36a42e583bcc17533d5a11085/aiothrift-0.0.0.1.tar.gz" } ], "0.0.0.2": [ { "comment_text": "", "digests": { "md5": "e5a984384fcef5cc949571e57479b56d", "sha256": "11fb7f988c9cf60381e0980ce374e9fec9a0353b3de76e2d7a5a312b8191f0f1" }, "downloads": -1, "filename": "aiothrift-0.0.0.2.tar.gz", "has_sig": false, "md5_digest": "e5a984384fcef5cc949571e57479b56d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8193, "upload_time": "2017-01-11T07:51:09", "url": "https://files.pythonhosted.org/packages/f8/0b/7dbcbee7c6a841e078529e8c43dc2997d67783defb3cd9c842d12c2649f8/aiothrift-0.0.0.2.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "fc53162ec33ea0b44da1e0871d2c3dd8", "sha256": "cfe3372b500ce409d8a103e1c0ba509732a593e70fbdcf3bb1366973dff8041b" }, "downloads": -1, "filename": "aiothrift-0.0.1.tar.gz", "has_sig": false, "md5_digest": "fc53162ec33ea0b44da1e0871d2c3dd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1350, "upload_time": "2016-12-26T07:28:25", "url": "https://files.pythonhosted.org/packages/42/e6/9cb9b7bde26013dc2d44d9c948e568c7e3a73ec130bea67931ad59c56769/aiothrift-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e9ffa7b259c61961ff5ccc07d90d2611", "sha256": "9aa7143b997f95e95bcf48f473f1c7f7cc9a3691e63c79612c47bbc40827ea5b" }, "downloads": -1, "filename": "aiothrift-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e9ffa7b259c61961ff5ccc07d90d2611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8095, "upload_time": "2017-01-11T07:21:24", "url": "https://files.pythonhosted.org/packages/de/4d/2aa199076185e2a999535873effa01f3ff3119729a3dee7ec87f01ce53b5/aiothrift-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "17ae948575a4bb4fa1c4ca34ed2ed6e1", "sha256": "6d27edad297fefcb96a9f79f510c9a9432fa2271ecd04bcd21a75e7074c2ff01" }, "downloads": -1, "filename": "aiothrift-0.0.3.tar.gz", "has_sig": false, "md5_digest": "17ae948575a4bb4fa1c4ca34ed2ed6e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8122, "upload_time": "2017-01-11T07:24:29", "url": "https://files.pythonhosted.org/packages/1b/b7/b644e1742fa92a36d831af9b239299e9d00233ff891919dffa9a7f486234/aiothrift-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "bda57a76cc35b461610d9f1c426b8fd1", "sha256": "e7b18bfda3d3744d967435e5338649a43031b565a9c1ae02007867431f44cc50" }, "downloads": -1, "filename": "aiothrift-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bda57a76cc35b461610d9f1c426b8fd1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8144, "upload_time": "2017-01-11T07:35:12", "url": "https://files.pythonhosted.org/packages/d1/8a/53114c7060ef6a99841abe16f5692bf7a8f8426ea1b697791d72b8040238/aiothrift-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ee382f0040ff0867a64d4364204bac1b", "sha256": "9a9df7111d74e8b6f82d3780a84cb52c2af4079f9028ce7845f5d5520f3fc851" }, "downloads": -1, "filename": "aiothrift-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ee382f0040ff0867a64d4364204bac1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8222, "upload_time": "2017-01-11T07:56:53", "url": "https://files.pythonhosted.org/packages/56/c4/814a46e3995b9634ef7676311e041af21967e5c5f9dab4456683384eacdb/aiothrift-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "b088ac5e0b8cf1ac9c76d6336924ff75", "sha256": "6f7ba0d56f8d530917c78aac2aeff518d30bd02c06d5517bed77dfcd61d7c52d" }, "downloads": -1, "filename": "aiothrift-0.0.6.tar.gz", "has_sig": false, "md5_digest": "b088ac5e0b8cf1ac9c76d6336924ff75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10878, "upload_time": "2017-01-12T05:02:22", "url": "https://files.pythonhosted.org/packages/40/b6/c9e022a1f842ab547b2936f47833e98d331dc00a8f198f2f2f792309517f/aiothrift-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "5224f3d9da165578fcb4872777f753e8", "sha256": "63ef5b2b629530d56e5cacd6920940642fa855524d614d1ae69c6c27f4b543b6" }, "downloads": -1, "filename": "aiothrift-0.0.7.tar.gz", "has_sig": false, "md5_digest": "5224f3d9da165578fcb4872777f753e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12522, "upload_time": "2017-01-13T08:34:36", "url": "https://files.pythonhosted.org/packages/b2/f0/8244e4b93f1177fb80aedd3ee77e50d86bc2f94746f4057b6cd2f53f5a1f/aiothrift-0.0.7.tar.gz" } ], "0.0.7.1": [ { "comment_text": "", "digests": { "md5": "f7c9622365ce51f3f467810c93c1b717", "sha256": "64cdfe0a83dcd36adab8062a2cb766bc97d6322357f0a3e2314e322610fd8b3e" }, "downloads": -1, "filename": "aiothrift-0.0.7.1.tar.gz", "has_sig": false, "md5_digest": "f7c9622365ce51f3f467810c93c1b717", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12580, "upload_time": "2017-01-13T11:17:26", "url": "https://files.pythonhosted.org/packages/91/d8/03fe983b58b6171fa57b29e2e82d9e6028d738a1845f2625a3a35a248103/aiothrift-0.0.7.1.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "0441dbd29ef396a3cc7ceee34e344da0", "sha256": "825039dd30b7cef1bf6d6787510bab7a7d0d3a7129cd204a5c1746c16209f59a" }, "downloads": -1, "filename": "aiothrift-0.0.8.tar.gz", "has_sig": false, "md5_digest": "0441dbd29ef396a3cc7ceee34e344da0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14657, "upload_time": "2017-01-17T13:58:02", "url": "https://files.pythonhosted.org/packages/12/86/47d8cba24e7303d02243761e46fff5c44f01fd1a592bc777d9aa9668ee8c/aiothrift-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "22676a462860559844d1feba1712b83f", "sha256": "8ec4d859d124a7845272f6194692d9471c6e59852763919cb9b5943ee8b2571c" }, "downloads": -1, "filename": "aiothrift-0.0.9.tar.gz", "has_sig": false, "md5_digest": "22676a462860559844d1feba1712b83f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16060, "upload_time": "2017-01-18T08:09:38", "url": "https://files.pythonhosted.org/packages/15/4e/0754117ba72736e5607c3c1536b6e7ae1b11a2804b2a21e70c9b4cc50a44/aiothrift-0.0.9.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "c055ff6ba4cddcec1c4e816aac6e5e55", "sha256": "ac34b20481a0c8ca0bda8862eabf471e9525644c8995aaa522e9860a38d2910d" }, "downloads": -1, "filename": "aiothrift-0.1.tar.gz", "has_sig": false, "md5_digest": "c055ff6ba4cddcec1c4e816aac6e5e55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15942, "upload_time": "2017-01-18T08:50:30", "url": "https://files.pythonhosted.org/packages/4d/d9/ac154bfbb52653cc739bb299df5a44a3af1f2a2d0c78a160408624dab0a8/aiothrift-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6df5ff4db9d8f7bf0011eb05d1073ecb", "sha256": "6efc31dd8fb6c04e78c23b59100b5702c5bc3703ad7757bf3ced62058564317c" }, "downloads": -1, "filename": "aiothrift-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6df5ff4db9d8f7bf0011eb05d1073ecb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14997, "upload_time": "2018-04-12T06:12:38", "url": "https://files.pythonhosted.org/packages/85/58/4c778bb0fa339010e27c3231cba3480a7baf89753779e52f70a79b9d916d/aiothrift-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb19cc067b0bedc3933bda4809928a00", "sha256": "3188481a47e3521f940bcfc67b5f98d41c1ee8e3e733239c38be8e56f98462cd" }, "downloads": -1, "filename": "aiothrift-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bb19cc067b0bedc3933bda4809928a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16754, "upload_time": "2018-04-12T06:12:40", "url": "https://files.pythonhosted.org/packages/41/6c/28d90506939ef7d5fcde612461ae34a8ff545298bdb599e84b26c8db125e/aiothrift-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6df5ff4db9d8f7bf0011eb05d1073ecb", "sha256": "6efc31dd8fb6c04e78c23b59100b5702c5bc3703ad7757bf3ced62058564317c" }, "downloads": -1, "filename": "aiothrift-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6df5ff4db9d8f7bf0011eb05d1073ecb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14997, "upload_time": "2018-04-12T06:12:38", "url": "https://files.pythonhosted.org/packages/85/58/4c778bb0fa339010e27c3231cba3480a7baf89753779e52f70a79b9d916d/aiothrift-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb19cc067b0bedc3933bda4809928a00", "sha256": "3188481a47e3521f940bcfc67b5f98d41c1ee8e3e733239c38be8e56f98462cd" }, "downloads": -1, "filename": "aiothrift-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bb19cc067b0bedc3933bda4809928a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16754, "upload_time": "2018-04-12T06:12:40", "url": "https://files.pythonhosted.org/packages/41/6c/28d90506939ef7d5fcde612461ae34a8ff545298bdb599e84b26c8db125e/aiothrift-0.1.1.tar.gz" } ] }