aioplus
Key Features
builtins,itertoolsandmore-itertools- but asynchronous;- Seamless sync-async bridging (
awaitify,anextify, etc.); - Early returns never cause unawaited coroutine warnings.
Getting Started
Installation
The library is available as aioplus on PyPI:
pip install aioplus
Usage
CallerThreadExecutor
For more, see the documentation.
>>> executor = CallerThreadExecutor()
>>> loop = asyncio.new_event_loop()
>>> loop.set_default_executor(executor)
aall
For more, see the documentation.
>>> aiterable = arange(23)
>>> await aall(aiterable)
False
aany
For more, see the documentation.
>>> aiterable = arange(23)
>>> await aany(aiterable)
True
abatched
For more, see the documentation.
>>> aiterable = arange(23)
>>> [batch async for batch in abatched(aiterable, n=3)]
[(0, 1, 2), (3, 4, 5), ..., (18, 19, 20), (21, 22)]
achain
For more, see the documentation.
>>> nums1 = arange(0, 3)
>>> nums2 = arange(3, 6)
>>> [num async for num in achain(nums1, nums2)]
[0, 1, 2, 3, 4, 5]
acount
For more, see the documentation.
>>> [num async for num in acount(start=23, step=4)]
[23, 27, 31, 35, 39, 43, 47, ...]
acycle
For more, see the documentation.
>>> aiterable = arange(23)
>>> [num async for num in acycle(aiterable)]
[0, 1, ..., 22, 23, 0, 1, ..., 22, 23, ...]
aempty
For more, see the documentation.
>>> aiterable = arange(23)
>>> await aempty(aiterable)
False
aenumerate
For more, see the documentation.
>>> aiterable = arange(4, 23)
>>> [(index, num) async for index, num in aenumerate(aiterable)]
[(0, 4), (1, 5), (2, 6), (3, 7), ..., (17, 21), (18, 22)]
afirst
For more, see the documentation.
>>> aiterable = arange(23)
>>> await afirst(aiterable)
0
ahead
For more, see the documentation.
>>> aiterable = arange(23)
>>> [num async for num in ahead(aiterable, n=4)]
[0, 1, 2, 3]
aislice
For more, see the documentation.
>>> aiterable = arange(2003)
>>> [num async for num in aislice(aiterable, 4, 23)]
[4, 5, 6, 7, 8, ..., 20, 21, 22]
alast
For more, see the documentation.
>>> aiterable = arange(23)
>>> await alast(aiterable)
22
alen
For more, see the documentation.
>>> aiterable = arange(23)
>>> await alen(aiterable)
23
amax
For more, see the documentation.
>>> aiterable = arange(23)
>>> await amax(aiterable)
22
amin
For more, see the documentation.
>>> aiterable = arange(23)
>>> await amin(aiterable)
0
aminmax
For more, see the documentation.
>>> aiterable = arange(23)
>>> await aminmax(aiterable)
(0, 22)
anextify
For more, see the documentation.
>>> iterable = [0, 1, 2, 3, 4, 5]
>>> aiterable = anextify(iterable)
>>> [num async for num in aiterable]
[0, 1, 2, 3, 4, 5]
anth
For more, see the documentation.
>>> aiterable = arange(23)
>>> await anth(aiterable, n=4)
4
apairwise
For more, see the documentation.
>>> aiterable = arange(23)
>>> [pair async for pair in apairwise(aiterable)]
[(0, 1), (1, 2), (2, 3), ..., (20, 21), (21, 22)]
apostpend
For more, see the documentation.
>>> [num async for num in apostpend(arange(4), 4)]
[0, 1, 2, 3, 4]
aprepend
For more, see the documentation.
>>> [num async for num in aprepend(0, arange(1, 5))]
[0, 1, 2, 3, 4]
arange
For more, see the documentation.
>>> [num async for num in arange(23)]
[0, 1, 2, 3, 4, ..., 19, 20, 21, 22]
arepeat
For more, see the documentation.
>>> [num async for num in arepeat(23, times=4)]
[23, 23, 23, 23]
areversed
For more, see the documentation.
>>> aiterable = arange(23)
>>> [num async for num in areversed(aiterable)]
[22, 21, 20, 19, 18, ..., 4, 3, 2, 1, 0]
asum
For more, see the documentation.
>>> aiterable = arange(23)
>>> await asum(aiterable)
253
atabulate
For more, see the documentation.
>>> afunc = awaitify(lambda x: x * x)
>>> [num async for num in atabulate(afunc)]
[0, 1, 4, 9, 16, 25, 36, 49, ...]
atail
For more, see the documentation.
>>> aiterable = arange(23)
>>> [num async for num in atail(aiterable, n=4)]
[19, 20, 21, 22]
atriplewise
For more, see the documentation.
>>> aiterable = arange(23)
>>> [triplet async for triplet in atriplewise(aiterable)]
[(0, 1, 2), (1, 2, 3), ..., (19, 20, 21), (20, 21, 22)]
awaitify
For more, see the documentation.
>>> aprint = awaitify(print)
>>> await aprint("4 -> 23")
4 -> 23
awindowed
For more, see the documentation.
>>> aiterable = arange(23)
>>> [window async for window in awindowed(aiterable, n=3)]
[(0, 1, 2), (1, 2, 3), ..., (19, 20, 21), (20, 21, 22)]
azip
For more, see the documentation.
>>> xs = arange(42)
>>> ys = arange(4, 23)
>>> [(x, y) async for x, y in azip(xs, ys)]
[(0, 4), (1, 5), (2, 6), ..., (18, 22)]
License
MIT License, Copyright (c) 2025 Sergei Y. Bogdanov. See LICENSE file.
Metadata
Release files for aioplus 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aioplus-0.7.0.tar.gz | 14.8 kB | Without provenance | Details for aioplus-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioplus-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for aioplus-0.7.0-py3-none-any.whl |
Total release size: 47.9 kB
Release files / aioplus-0.7.0.tar.gz
| Download URL | aioplus-0.7.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffb8fb102f6ab3c99491d1783811dd84609ab8ea5d970863257f7638e4d33046
|
|
BLAKE2b-256 checksum How to use checksums |
31f02bc882f6a26d01cd89bf5104a88a9358f4ec97a07b53f22f4926209532f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.7 Windows/10
|
Release files / aioplus-0.7.0-py3-none-any.whl
| Download URL | aioplus-0.7.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8187a1f73f352f401a2c460bf35762e8f203cd54f3a2aea5f72c2e7d83f1860e
|
|
BLAKE2b-256 checksum How to use checksums |
cb8efa70ff5cb6501b170c70735f1b580e5695c483848f7bd5ddb696a7fbce0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.7 Windows/10
|
Security for aioplus 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.