Decorator that turns async generator functions into async context managers.
Project description
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)
pip install asyncio-contextmanager
Usage
Usage is straightforward and simple:
from aiocontext import async_contextmanager
@async_contextmanager
async def foo():
yield 'Foo!'