{ "info": { "author": "Davide Rizzo", "author_email": "sorcio@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": ".. role:: python(code)\n :language: python\n\n.. image:: https://img.shields.io/pypi/v/async_exit_stack.svg\n :target: https://pypi.python.org/pypi/async_exit_stack\n\n.. image:: https://img.shields.io/travis/sorcio/async_exit_stack.svg\n :target: https://travis-ci.org/sorcio/async_exit_stack\n\n\n=======================================\nAsyncExitStack backport for Python 3.5+\n=======================================\n\n\n* Free software: PSF license\n* Documentation: https://docs.python.org/3.7/library/contextlib.html#contextlib.AsyncExitStack\n\nThis package contains code from the CPython project.\n\n\nInstall\n-------\n\n::\n\n pip install async_exit_stack\n\n\n\nUsage example\n-------------\n\n.. code:: python\n\n from async_exit_stack import AsyncExitStack\n\n async def some_async_function():\n async with AsyncExitStack() as stack:\n connections = [await stack.enter_async_context(get_connection())\n for i in range(5)]\n # All opened connections will automatically be released at the end of\n # the async with statement, even if attempts to open a connection\n # later in the list raise an exception.\n\n\nReference\n---------\n\nRefer to `Python 3.7 contextlib documentation\n`_\nfor a complete reference and more context.\n\n`class AsyncExitStack`:python:\n An asynchronous context manager, similar to ExitStack, that supports combining\n both synchronous and asynchronous context managers, as well as having\n coroutines for cleanup logic.\n\n The close() method is not implemented, aclose() must be used instead.\n\n `enter_async_context(cm)`:python:\n Similar to enter_context() but expects an asynchronous context manager.\n\n `push_async_exit(exit)`:python:\n Similar to push() but expects either an asynchronous context manager or a coroutine.\n\n `push_async_callback(callback, *args, **kwds)`:python:\n Similar to callback() but expects a coroutine.\n\n `aclose()`:python:\n Similar to close() but properly handles awaitables.\n\n\n=======\nHistory\n=======\n\n1.0.0 (2018-05-07)\n------------------\n\n* First release based on Python 3.7b4.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sorcio/async_exit_stack", "keywords": "async_exit_stack", "license": "Python Software Foundation License", "maintainer": "", "maintainer_email": "", "name": "async-exit-stack", "package_url": "https://pypi.org/project/async-exit-stack/", "platform": "", "project_url": "https://pypi.org/project/async-exit-stack/", "project_urls": { "Homepage": "https://github.com/sorcio/async_exit_stack" }, "release_url": "https://pypi.org/project/async-exit-stack/1.0.1/", "requires_dist": null, "requires_python": ">=3.5", "summary": "AsyncExitStack backport for Python 3.5+", "version": "1.0.1" }, "last_serial": 3841389, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "992cd0802def9ac79440268348a0387b", "sha256": "9b43b17683b3438f428ef3bbec20689f5abbb052aa4b564c643397330adfaa99" }, "downloads": -1, "filename": "async_exit_stack-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "992cd0802def9ac79440268348a0387b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4681, "upload_time": "2018-05-07T15:54:45", "url": "https://files.pythonhosted.org/packages/77/ae/f5baabf02fe19c4015b0417e72e36220fb95ed3e7cf17e8a85004b964709/async_exit_stack-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c16d3ac6243ed086ab7a9c7266f013b", "sha256": "24de1ad6d0ff27be97c89d6709fa49bf20db179eaf1f4d2e6e9b4409b80e747d" }, "downloads": -1, "filename": "async_exit_stack-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4c16d3ac6243ed086ab7a9c7266f013b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 10562, "upload_time": "2018-05-07T15:54:46", "url": "https://files.pythonhosted.org/packages/33/9c/ecf37497cd8c4aa6d62de0a67deeb80d4407fd930a689362e588458aff81/async_exit_stack-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "992cd0802def9ac79440268348a0387b", "sha256": "9b43b17683b3438f428ef3bbec20689f5abbb052aa4b564c643397330adfaa99" }, "downloads": -1, "filename": "async_exit_stack-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "992cd0802def9ac79440268348a0387b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4681, "upload_time": "2018-05-07T15:54:45", "url": "https://files.pythonhosted.org/packages/77/ae/f5baabf02fe19c4015b0417e72e36220fb95ed3e7cf17e8a85004b964709/async_exit_stack-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c16d3ac6243ed086ab7a9c7266f013b", "sha256": "24de1ad6d0ff27be97c89d6709fa49bf20db179eaf1f4d2e6e9b4409b80e747d" }, "downloads": -1, "filename": "async_exit_stack-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4c16d3ac6243ed086ab7a9c7266f013b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 10562, "upload_time": "2018-05-07T15:54:46", "url": "https://files.pythonhosted.org/packages/33/9c/ecf37497cd8c4aa6d62de0a67deeb80d4407fd930a689362e588458aff81/async_exit_stack-1.0.1.tar.gz" } ] }