asyncio-contextmanager-1.0.1
توضیحات
Decorator that turns async generator functions into async context managers.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | asyncio-contextmanager-1.0.1 |
| نام | asyncio-contextmanager |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | sashgorokhov |
| ایمیل نویسنده | sashgorokhov@gmail.com |
| آدرس صفحه اصلی | https://github.com/sashgorokhov/asyncio-contextmanager |
| آدرس اینترنتی | https://pypi.org/project/asyncio-contextmanager/ |
| مجوز | MIT License |
asyncio-contextmanager
======================
|PyPI version| |GitHub release| |Build Status| |codecov| |GitHub
license|
Decorator that turns async generator functions into async context
managers.
Installation
------------
Supported versions of python: **``3.6+``** (since async generators were
introduced in python 3.6)
.. code:: shell
pip install asyncio-contextmanager
Usage
-----
Usage is straightforward and simple:
.. code:: python
from aiocontext import async_contextmanager
@async_contextmanager
async def foo():
yield 'Foo!'
.. |PyPI version| image:: https://badge.fury.io/py/asyncio-contextmanager.svg
:target: https://badge.fury.io/py/asyncio-contextmanager
.. |GitHub release| image:: https://img.shields.io/github/release/sashgorokhov/asyncio-contextmanager.svg
:target: https://github.com/sashgorokhov/asyncio-contextmanager
.. |Build Status| image:: https://travis-ci.org/sashgorokhov/asyncio-contextmanager.svg?branch=master
:target: https://travis-ci.org/sashgorokhov/asyncio-contextmanager
.. |codecov| image:: https://codecov.io/gh/sashgorokhov/asyncio-contextmanager/branch/master/graph/badge.svg
:target: https://codecov.io/gh/sashgorokhov/asyncio-contextmanager
.. |GitHub license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://raw.githubusercontent.com/sashgorokhov/asyncio-contextmanager/master/LICENSE
نحوه نصب
نصب پکیج whl asyncio-contextmanager-1.0.1:
pip install asyncio-contextmanager-1.0.1.whl
نصب پکیج tar.gz asyncio-contextmanager-1.0.1:
pip install asyncio-contextmanager-1.0.1.tar.gz