Skip to main content

Decorator that turns async generator functions into async context managers.

Project description

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)

pip install asyncio-contextmanager

Usage

Usage is straightforward and simple:

from aiocontext import async_contextmanager

@async_contextmanager
async def foo():
    yield 'Foo!'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncio-contextmanager-1.0.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file asyncio-contextmanager-1.0.1.tar.gz.

File metadata

File hashes

Hashes for asyncio-contextmanager-1.0.1.tar.gz
Algorithm Hash digest
SHA256 93b4620cd79623c3988c9f43e6f502263968645cd13aed3327a7ec8be43221d5
MD5 c8ce0047d83dfcb6654debd8a434d7b7
BLAKE2b-256 06d5fd2ad931e9397c599c81a6a5284d24fa1135d16aac2cc312773b8e8a3828

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page