https://github.com/richardkiss/aiter
Useful constructs building upon asynchronous iterators
https://github.com/richardkiss/aiter
asynchronous-programming asyncio python3
Last synced: 11 months ago
JSON representation
Useful constructs building upon asynchronous iterators
- Host: GitHub
- URL: https://github.com/richardkiss/aiter
- Owner: richardkiss
- License: mit
- Created: 2019-02-10T05:22:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-07T22:52:24.000Z (over 1 year ago)
- Last Synced: 2025-03-01T05:41:25.475Z (12 months ago)
- Topics: asynchronous-programming, asyncio, python3
- Language: Python
- Size: 60.5 KB
- Stars: 9
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.org
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/richardkiss/aiter)
[](https://codecov.io/github/richardkiss/aiter)
[](https://aiter.readthedocs.io/en/latest/?badge=latest)
aiter -- Asynchronous Iterator Patterns
=======================================
[PEP 525](https://www.python.org/dev/peps/pep-0525/) describes *asynchronous iterators*, a merging of iterators with async functionality. Python 3.6 makes legal constructs such as
```
async for event in peer.event_iterator:
await process_event(event)
```
which is a huge improvement over using `async.Queue` objects which have no built-in way to determine "end-of-stream" conditions.
This module implements some patterns useful for python asynchronous iterators.
Documentation available on [readthedocs.io](https://aiter.readthedocs.io/).
A [tutorial](TUTORIAL.org) is available. [github version](https://github.com/richardkiss/aiter/blob/feature/tutorial/TUTORIAL.org)
*CAVEAT* This project is still in its infancy, and I reserve the right to rename things and cause other breaking changes.