Module rpu.async_.iterables
Functions
async def chunk(iterable: AsyncIterable, max_size: int) ‑> AsyncIterable[list[Any]]
-
|async-iterable|
Chunks the given iterable into chunks of the given size
Parameters
iterable
:typing.AsyncIterable
- The iterable you want to chunk
max_size
:int
- the max size of the chunks
async def get(iterable: AsyncIterable, /, **attrs: Any) ‑> Any
-
|coro|
Gets an item from the given iterable with sertain attributes
Parameters
iterable
:typing.AsyncIterable
- The item you want to be iterated through
**attrs
:typing.Any
- The attribute(s) to check for