or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pyrate-limiter@3.9.x
tile.json

tessl/pypi-pyrate-limiter

tessl install tessl/pypi-pyrate-limiter@3.9.0

Python 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%

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how effectively the engineer uses pyrate-limiter's core limiter API, specifically the try_acquire method and related components, to implement rate limiting with blocking, non-blocking, and timeout behaviors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Limiter initialization",
      "description": "Creates a Limiter instance, properly initializing it with a Rate object that defines the rate limit (e.g., Rate(limit=max_requests, interval=Duration.SECOND * time_window_seconds))",
      "max_score": 20
    },
    {
      "name": "Basic try_acquire usage",
      "description": "Uses the try_acquire method with the name parameter to acquire permits for rate-limited operations",
      "max_score": 15
    },
    {
      "name": "Non-blocking mode",
      "description": "Implements non-blocking behavior by calling try_acquire with blocking=False parameter, allowing immediate return when rate limit is exceeded",
      "max_score": 15
    },
    {
      "name": "Blocking mode",
      "description": "Implements blocking behavior by calling try_acquire with blocking=True parameter (or default), causing the method to wait until permits become available",
      "max_score": 15
    },
    {
      "name": "Timeout handling",
      "description": "Uses the timeout parameter in try_acquire to limit waiting time in blocking mode, properly handling the timeout by checking return value or catching exceptions",
      "max_score": 15
    },
    {
      "name": "Rate configuration",
      "description": "Properly uses Duration enum (e.g., Duration.SECOND) in conjunction with Rate class to configure time windows for rate limits",
      "max_score": 10
    },
    {
      "name": "Resource cleanup",
      "description": "Properly manages limiter lifecycle, either by using context manager (with statement) or explicitly calling close() method",
      "max_score": 10
    }
  ]
}