tessl install tessl/pypi-asyncstdlib@3.13.0The missing async toolbox - re-implements functions and classes of the Python standard library to make them compatible with async callables, iterables and context managers
Agent Success
Agent success rate when using this tile
84%
Improvement
Agent success rate improvement when using this tile compared to baseline
3.36x
Baseline
Agent success rate without this tile
25%
Build a data processing system that combines and processes multiple asynchronous data streams in parallel.
You need to implement a data processor that:
The processor should handle streams of different types (user data, transaction amounts, and timestamps) and combine them element-by-element for processing.
@generates
async def process_streams(users, amounts, timestamps):
"""
Process multiple async streams by combining corresponding elements.
Args:
users: Async iterable of user names (strings)
amounts: Async iterable of transaction amounts (floats)
timestamps: Async iterable of timestamps (integers)
Returns:
List of tuples containing (user, amount, timestamp) for each position
Example:
users = async_generator(['Alice', 'Bob', 'Charlie'])
amounts = async_generator([100.0, 250.5, 75.25])
timestamps = async_generator([1609459200, 1609545600, 1609632000])
result = await process_streams(users, amounts, timestamps)
# Returns: [('Alice', 100.0, 1609459200), ('Bob', 250.5, 1609545600), ('Charlie', 75.25, 1609632000)]
"""
passProvides async-compatible versions of standard library functions for working with async iterables.