asyncio version of the standard multiprocessing module
Project description
aioitertools
itertools for AsyncIO and mixed iterables.
Install
aioitertools requires Python 3.6 or newer. You can install it from PyPI:
$ pip3 install aioitertools
Usage
aioitertools shadows the standard library whenever possible to provide asynchronous version of the modules and functions you already know. It's fully compatible with standard iterators and async iterators alike, giving you one unified, familiar interface for interacting with iterable objects:
from aioitertools import iter, next, map, zip
something = iter(...)
first_item = await next(something)
async for item in iter(something):
...
async def fetch(url):
response = await aiohttp.request(...)
return response.json
async for value in map(fetch, MANY_URLS):
...
async for a, b in zip(something, something_else):
...
See builtins.py for full documentation.
License
aioitertools is copyright John Reese, and licensed under
the MIT license. I am providing code in this repository to you under an open
source license. This is my personal repository; the license you receive to
my code is from me and not from my employer. See the LICENSE
file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file aioitertools-0.1.0.tar.gz
.
File metadata
- Download URL: aioitertools-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc7a150e3bfebcf562de1da2176a39748f69b1ed87e0d934119a154a4a72671f |
|
MD5 | 7618df0216b94251d4ff4afa1b3576e8 |
|
BLAKE2b-256 | b41f42cac891884156eb298d5dba7cb2b963552923fed1b74e54c62c695e673b |