All Projects → omnilib → Aioitertools

omnilib / Aioitertools

Licence: mit
itertools and builtins for AsyncIO and mixed iterables

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Labels

Projects that are alternatives of or similar to Aioitertools

Pymarketcap
Python3 API wrapper and web scraper for https://coinmarketcap.com
Stars: ✭ 73 (-29.81%)
Mutual labels:  asyncio
Aiovk
vk.com API python wrapper for asyncio
Stars: ✭ 85 (-18.27%)
Mutual labels:  asyncio
Rororo
Implement aiohttp.web OpenAPI 3 server applications with schema first approach.
Stars: ✭ 95 (-8.65%)
Mutual labels:  asyncio
Discogs aio spider
基于httpx的一个大型项目 ,爬取黑胶唱片网站 Discogs
Stars: ✭ 74 (-28.85%)
Mutual labels:  asyncio
Aiomysql
aiomysql is a library for accessing a MySQL database from the asyncio
Stars: ✭ 1,252 (+1103.85%)
Mutual labels:  asyncio
Ant nest
Simple, clear and fast Web Crawler framework build on python3.6+, powered by asyncio.
Stars: ✭ 90 (-13.46%)
Mutual labels:  asyncio
Web develop
《Python Web开发实战》书中源码
Stars: ✭ 1,146 (+1001.92%)
Mutual labels:  asyncio
Aioauth
Asynchronous OAuth 2.0 framework and provider for Python 3
Stars: ✭ 102 (-1.92%)
Mutual labels:  asyncio
Jd4
Judging daemon for programming contests
Stars: ✭ 85 (-18.27%)
Mutual labels:  asyncio
Kevin
A simple-stupid self-hostable continuous integration service. 🙈
Stars: ✭ 95 (-8.65%)
Mutual labels:  asyncio
Python Dependency Injector
Dependency injection framework for Python
Stars: ✭ 1,203 (+1056.73%)
Mutual labels:  asyncio
Aiosip
SIP support for AsyncIO (DEPRECATED)
Stars: ✭ 83 (-20.19%)
Mutual labels:  asyncio
Raven Aiohttp
An aiohttp transport for raven-python
Stars: ✭ 92 (-11.54%)
Mutual labels:  asyncio
Pfun
Functional, composable, asynchronous, type-safe Python.
Stars: ✭ 75 (-27.88%)
Mutual labels:  asyncio
Python Dbus Next
🚌 The next great DBus library for Python with asyncio support
Stars: ✭ 95 (-8.65%)
Mutual labels:  asyncio
Pyfailsafe
Simple failure handling. Failsafe implementation in Python
Stars: ✭ 70 (-32.69%)
Mutual labels:  asyncio
Aiocassandra
Simple threaded cassandra wrapper for asyncio
Stars: ✭ 86 (-17.31%)
Mutual labels:  asyncio
Greenletio
Asyncio integration with sync code using greenlets.
Stars: ✭ 102 (-1.92%)
Mutual labels:  asyncio
Ruia
Async Python 3.6+ web scraping micro-framework based on asyncio
Stars: ✭ 1,366 (+1213.46%)
Mutual labels:  asyncio
Ib insync
Python sync/async framework for Interactive Brokers API
Stars: ✭ 1,329 (+1177.88%)
Mutual labels:  asyncio

aioitertools

Implementation of itertools, builtins, and more for AsyncIO and mixed-type iterables.

build status code coverage version license code style

Install

aioitertools requires Python 3.6 or newer. You can install it from PyPI:

$ pip 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):
    ...

aioitertools emulates the entire itertools module, offering the same function signatures, but as async generators. All functions support standard iterables and async iterables alike, and can take functions or coroutines:

from aioitertools import chain, islice

async def generator1(...):
    yield ...

async def generator2(...):
    yield ...

async for value in chain(generator1(), generator2()):
    ...

async for value in islice(generator1(), 2, None, 2):
    ...

See builtins.py, itertools.py, and more_itertools.py for full documentation of functions and abilities.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].