The missing async toolbox - re-implements functions and classes of the Python standard library to make them compatible with async callables, iterables and context managers
84
Quality
Pending
Does it follow best practices?
Impact
84%
3.36xAverage score across 10 eval scenarios
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.
Install with Tessl CLI
npx tessl i tessl/pypi-asyncstdlibevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10