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 aggregator that processes async streams of sensor readings and computes summary statistics.
You need to implement a function that processes async streams of numeric sensor readings and returns aggregated statistics. The function should efficiently handle async iterables and compute the sum, maximum, and minimum values from the stream.
Implement aggregate_sensor_data(readings) that:
"sum", "max", and "min""sum" key contains the total sum of all readings"max" key contains the largest reading value"min" key contains the smallest reading value{"sum": 0, "max": None, "min": None}{"sum": 60, "max": 30, "min": 10} @test{"sum": 18.9, "max": 8.1, "min": 2.3} (with floating point tolerance) @test{"sum": -35, "max": -5, "min": -20} @test{"sum": 0, "max": None, "min": None} @test{"sum": 42, "max": 42, "min": 42} @test@generates
async def aggregate_sensor_data(readings):
"""
Aggregate sensor readings from an async iterable.
Args:
readings: An async iterable of numeric values
Returns:
dict: A dictionary with keys "sum", "max", and "min"
"""
passProvides async-compatible versions of standard library functions for working with async iterables.
@satisfied-by