tessl install tessl/pypi-pyrate-limiter@3.9.0Python Rate-Limiter using Leaky-Bucket Algorithm for controlling request rates in applications with multiple backend storage options.
Agent Success
Agent success rate when using this tile
81%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.45x
Baseline
Agent success rate without this tile
56%
{
"context": "This criteria evaluates the engineer's ability to use PyrateLimiter's decorator pattern for applying rate limits to functions. It focuses on proper usage of the as_decorator() method for both synchronous and asynchronous functions, as well as handling weighted rate limits through decorators.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Limiter initialization",
"description": "Creates a Limiter instance with appropriate Rate objects using Rate(limit, Duration) constructor. Should use InMemoryBucket or similar backend for storage.",
"max_score": 15
},
{
"name": "Sync decorator usage",
"description": "Uses limiter.as_decorator() method to decorate the synchronous fetch_user_data function with the correct rate limit (5 calls per 10 seconds). The decorator should be applied properly without breaking function signature.",
"max_score": 20
},
{
"name": "Async decorator usage",
"description": "Uses limiter.as_decorator() method to decorate the asynchronous fetch_orders_async function with the correct rate limit (10 calls per 15 seconds). The decorator should properly handle async functions.",
"max_score": 20
},
{
"name": "Weighted decorator implementation",
"description": "Uses limiter.as_decorator() with the weight parameter to apply different weights to the fetch_bulk_report function. The implementation should dynamically set weights based on report_size parameter (small=1, medium=3, large=5).",
"max_score": 25
},
{
"name": "Rate configuration correctness",
"description": "Correctly defines Rate objects using the Rate class constructor with appropriate limit values and Duration enum values (SECOND). All three rate configurations match the spec requirements exactly.",
"max_score": 15
},
{
"name": "Blocking behavior",
"description": "Ensures that rate limiters use blocking mode (default behavior) so that functions wait when rate limits are exceeded rather than raising exceptions or returning errors.",
"max_score": 5
}
]
}