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-2/

{
  "context": "This criteria evaluates how well the engineer uses the pyrate-limiter package's basic limiter API to implement rate limiting functionality. The focus is on proper usage of the Rate class for defining rate limits, the Limiter class for managing rate limiting operations, and the try_acquire method for controlling request flow with both blocking and non-blocking modes.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Rate definition",
      "description": "Uses the Rate class to define rate limits with proper limit count and time interval (e.g., Rate(5, Duration.MINUTE) or Rate(3, Duration.SECOND))",
      "max_score": 20
    },
    {
      "name": "Limiter initialization",
      "description": "Creates Limiter instance properly, passing Rate objects and optionally a bucket backend (e.g., Limiter(rate) or Limiter(rate, bucket))",
      "max_score": 20
    },
    {
      "name": "try_acquire usage",
      "description": "Uses the try_acquire method with appropriate parameters including identity/name and blocking parameter (e.g., limiter.try_acquire(client_id, blocking=True))",
      "max_score": 25
    },
    {
      "name": "Blocking mode",
      "description": "Correctly implements blocking behavior by setting blocking=True in try_acquire, allowing the method to wait until a request can proceed",
      "max_score": 15
    },
    {
      "name": "Non-blocking mode",
      "description": "Correctly implements non-blocking behavior by setting blocking=False in try_acquire, enabling immediate return of True/False without waiting",
      "max_score": 15
    },
    {
      "name": "Per-client routing",
      "description": "Properly uses different identity/name values for different clients in try_acquire to maintain separate rate limit tracking for each client",
      "max_score": 5
    }
  ]
}