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

{
  "context": "This criteria evaluates how effectively the engineer uses PyrateLimiter's BucketFactory pattern to implement per-tenant rate limiting with dynamic bucket creation and tier-based routing. The focus is on proper use of the factory pattern, Rate configuration, and bucket management.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "BucketFactory usage",
      "description": "Creates a custom class that inherits from or implements BucketFactory pattern, with a get() method that routes items to appropriate buckets based on tenant ID",
      "max_score": 30
    },
    {
      "name": "Rate configuration",
      "description": "Uses Rate class to define tier-specific rate limits (10/minute for basic, 50/minute for premium, 200/minute for enterprise) with Duration.MINUTE",
      "max_score": 20
    },
    {
      "name": "Dynamic bucket creation",
      "description": "Implements dynamic bucket creation in the factory's get() method or equivalent, creating InMemoryBucket instances on-demand for new tenants",
      "max_score": 25
    },
    {
      "name": "Limiter integration",
      "description": "Uses Limiter class with the factory to perform rate limit enforcement via try_acquire() or similar method",
      "max_score": 15
    },
    {
      "name": "Per-tenant isolation",
      "description": "Properly routes requests so each tenant gets an independent bucket, ensuring one tenant's usage doesn't affect another's limits",
      "max_score": 10
    }
  ]
}