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
{
"context": "This criteria evaluates the engineer's ability to use asyncstdlib's cached_property decorator with lock synchronization to implement thread-safe cached async properties. The focus is on proper use of the caching mechanism, synchronization locks, and cache invalidation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses cached_property decorator",
"description": "The engineer imports and uses asyncstdlib.functools.cached_property (or asyncstdlib.cached_property) as a decorator on the mean, variance, and std_dev methods.",
"max_score": 30
},
{
"name": "Implements lock synchronization",
"description": "The engineer passes a lock type (such as asyncio.Lock) to the cached_property decorator to enable synchronized concurrent access, preventing multiple simultaneous computations of the same property.",
"max_score": 30
},
{
"name": "Correct decorator usage",
"description": "The cached_property decorator is correctly applied to all three async methods (mean, variance, std_dev), transforming them from methods into cached properties that can be accessed as attributes.",
"max_score": 20
},
{
"name": "Cache invalidation support",
"description": "The implementation supports cache invalidation through the del statement (e.g., del instance.mean), which is automatically supported by cached_property when used correctly.",
"max_score": 10
},
{
"name": "Async delay simulation",
"description": "Each property computation includes an async delay (using asyncio.sleep or equivalent) to simulate an expensive operation as specified in the requirements.",
"max_score": 10
}
]
}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