--- id: async-generator version: "1.10" license: MIT -or- Apache License 2.0 license_treatment: permissive maintenance: abandoned --- # async_generator — Async generators and context managers for Python 3.5+ License: permissive · Maintenance: abandoned · Downloads: 5.2M/mo ## What it is and what it does async_generator backports async generator and async context manager syntax from Python 3.6+ down to Python 3.5. It lets you write async generator functions using decorators (@async_generator and @asynccontextmanager) and the await yield_() pattern, enabling code that would otherwise only work on newer Python versions to run on 3.5. The package has no runtime dependencies and installs cleanly. It was maintained by the Trio project and works with any async library. However, the project is abandoned—the last release was 2018-08-01 and the last commit 2020-08-24—so it receives no updates, security patches, or maintenance. Use it for: - Maintain async code compatibility with Python 3.5 in legacy projects that cannot upgrade their minimum version. - Use native async generator syntax in Python 3.5 codebases without rewriting to older callback-based patterns. - Implement async context managers with @asynccontextmanager decorator on Python 3.5 before it was added to the standard library. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides async generators and async context managers for Python 3.5, backporting features from Python 3.6+ that enable writing async generator functions with native syntax. No, unless you are actively maintaining Python 3.5 code. The package is abandoned and unmaintained since 2020-08-24. If you control the Python version, upgrade to 3.6+ and use native async generators instead. ## Install pip install async-generator uv add async-generator poetry add async-generator ## Installing async_generator Before you install: Low friction installation with no runtime dependencies. However, the package is abandoned as of 2020-08-24 with no releases since 2018-08-01, so it receives no active maintenance or security updates. License in practice: Licensed under MIT or Apache License 2.0 (permissive dual license), giving you freedom to use, modify, and distribute the package with minimal restrictions. Quickstart: pip install async_generator from async_generator import async_generator, yield_ @async_generator async def load_json_lines(stream_reader): async for line in stream_reader: await yield_(line) Requires Python 3.5 or later; primarily useful for Python 3.5 codebases since Python 3.6+ has native async generator syntax. Verify before relying: - Whether the package remains compatible with modern Python versions beyond those listed in classifiers (3.5–3.6). - Whether async_generator is still necessary given that Python 3.5 reached end-of-life. ## Package facts - License: MIT -or- Apache License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 5.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async generators python 3.5, backport async yield, asynccontextmanager python 3.5, async context manager decorator, python 3.5 async support, async-backport, legacy-python [View on SkillFed](https://skillfed.io/packages/async-generator) · [View on PyPI](https://pypi.org/project/async-generator/)