{ "info": { "author": "Bogdan Gladyshev", "author_email": "siredvin.dark@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: AsyncIO", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=================================\nAsyncIO RethinkDB connection pool\n=================================\n\n\n.. image:: https://img.shields.io/pypi/v/async-repool.svg\n :target: https://pypi.python.org/pypi/async-repool\n.. image:: https://img.shields.io/pypi/l/async-repool.svg\n :target: https://pypi.python.org/pypi/async-repool\n.. image:: https://gitlab.com/AnjiProject/async-repool/badges/master/build.svg\n :target: https://gitlab.com/AnjiProject/async-repool\n\n:code:`async-repool` is a Python library which provides a asyncio-based connection pool management for accessing a RethinkDB database. :code:`async-repool` creates and maintains a configurable pool of active connection to a RethinkDB database. These connections are then available individually through a basic API.\n\nInternally, repool uses the Python `AsyncIO Queue`_ class which is not thread-safe. This means that the same connection pool cannot be share between several threads, please, use asyncio with process workers instead.\n\nThis is just asyncio-based clone of repool_.\n\nInstallation\n------------\n\n:code:`async-repool` is available as a python library on Pypi. Installation is very simple using pip :\n\n.. code:: bash\n\n $ pip install async_repool\n\nThis will install :code:`async-repool` as well as rethinkdb dependency.\n\nBasic usage\n-----------\n\nA new connection pool using default connection configurations can simply be created by:\n\n.. code:: python\n\n from async_repool import AsyncConnectionPool\n\n pool = AsyncConnectionPool(dict()) # Required argument is kwargs for R.connect function\n await pool.init_pool()\n conn = await pool.acquire() #returns a Connection instance\n await r.table('heroes').run(conn) #do RethinkDB stuff\n # ...\n pool.release(conn) #put back connection to the pool\n await pool.release_pool() #release pool (close rethinkdb connections)\n\n # ...\n async with pool.connect() as conn1:\n # do something with conn1\n # pool.release(conn1) is automatically called after leaving the with code block\n\n\nOptional arguments\n------------------\n\n:code:`AsyncConnectionPool` creation accepts a number of optional arguments:\n\n- :code:`pool_size`: set the pool size, ie. the number of connections opened simultaneously (default=3).\n- :code:`connection_ttl`: set the connection time to live. Connections older than TTL are automatically closed and re-opened when acquire (default=3600 seconds, set to 0 for disable)\n\n.. _`AsyncIO Queue`: https://docs.python.org/3/library/asyncio-queue.html\n.. _repool: https://github.com/njouanin/repool\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/AnjiProject/async-repool", "keywords": "rethinkdb asyncio connection pool", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "async-repool", "package_url": "https://pypi.org/project/async-repool/", "platform": "", "project_url": "https://pypi.org/project/async-repool/", "project_urls": { "Homepage": "https://gitlab.com/AnjiProject/async-repool" }, "release_url": "https://pypi.org/project/async-repool/1.0.1/", "requires_dist": [ "rethinkdb (>=2.4.0)", "tenacity (>=5.0.0)" ], "requires_python": "", "summary": "AsyncIO connection pool for RethinkDB", "version": "1.0.1" }, "last_serial": 5424832, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "4172f2f0c3184be57839d442a8605ad6", "sha256": "bd9e8b4161066cb9b6bd5610ac44d27ec3d51ef6ac3027a7954605e3f19755b0" }, "downloads": -1, "filename": "async_repool-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4172f2f0c3184be57839d442a8605ad6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7032, "upload_time": "2017-12-20T11:24:49", "url": "https://files.pythonhosted.org/packages/c9/f6/635e07ec0edbff52898ba1631a98e31a44b9693cd3edea9dd52e2fd09e30/async_repool-0.2.1-py2.py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b13644f5fa23ebc001cee3b53b37108c", "sha256": "65365e5361cdb13f7595237b29bf0e5405c023d62ec080fc760dd0a423d051d5" }, "downloads": -1, "filename": "async_repool-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b13644f5fa23ebc001cee3b53b37108c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5340, "upload_time": "2018-05-11T16:13:23", "url": "https://files.pythonhosted.org/packages/5a/d7/82334b1efcf41c3d4f3eb8f75b6c3f6eb1406a3fb9ec657426d0488ecb24/async_repool-0.3.0-py2.py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "9989311919e46320bd493ea7371f10c1", "sha256": "fc3114d38dd3b59f13cc54460301ad19095f4336bcc8ea0e27490900587448f9" }, "downloads": -1, "filename": "async_repool-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9989311919e46320bd493ea7371f10c1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5398, "upload_time": "2018-05-30T08:16:38", "url": "https://files.pythonhosted.org/packages/2f/a2/67b8687292526c68742bc9d6ffda2b24c46c2f5cb205e3a885af89a3418f/async_repool-0.3.1-py2.py3-none-any.whl" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9c6f9f9acd52d2db5212824f00454dff", "sha256": "288eb5dff2d37f08f33fb503b38e3ef0c5f3143680795ba8fba3d9d1be496b04" }, "downloads": -1, "filename": "async_repool-0.3.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9c6f9f9acd52d2db5212824f00454dff", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5535, "upload_time": "2018-07-02T16:15:33", "url": "https://files.pythonhosted.org/packages/70/f5/ff31b7e918f3a8e4bafceb9dd8edafd00e24f26996a01f65d02495c7acc8/async_repool-0.3.2-py2.py3-none-any.whl" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "a1fbec7d01e4902b818f34532879cfb9", "sha256": "6141ed85c13e139d21b6daa5a19bd3766b636c5c9fcfc0a7101017fb74b5a7c3" }, "downloads": -1, "filename": "async_repool-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a1fbec7d01e4902b818f34532879cfb9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6241, "upload_time": "2019-03-03T13:16:17", "url": "https://files.pythonhosted.org/packages/85/ef/e5faf6c792bdd3f1f60a7ae5dc73f070f63b937d9faa994fe568a71a8db4/async_repool-1.0.0-py2.py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "845186509c3584066bcd8f76e6d76074", "sha256": "3977026c173bb68f03963e71538e5c85ca61f0baf92abe96e550613de79bb0ed" }, "downloads": -1, "filename": "async_repool-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "845186509c3584066bcd8f76e6d76074", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6280, "upload_time": "2019-06-20T09:25:17", "url": "https://files.pythonhosted.org/packages/9c/de/ff971df70bf6828c7b0f7b2b456573893e2f0b793a52cd10b55c5f3bb77e/async_repool-1.0.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "845186509c3584066bcd8f76e6d76074", "sha256": "3977026c173bb68f03963e71538e5c85ca61f0baf92abe96e550613de79bb0ed" }, "downloads": -1, "filename": "async_repool-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "845186509c3584066bcd8f76e6d76074", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6280, "upload_time": "2019-06-20T09:25:17", "url": "https://files.pythonhosted.org/packages/9c/de/ff971df70bf6828c7b0f7b2b456573893e2f0b793a52cd10b55c5f3bb77e/async_repool-1.0.1-py2.py3-none-any.whl" } ] }