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

{
  "context": "This criteria evaluates the engineer's ability to use pyrate-limiter's PostgresBucket for ACID-compliant persistent rate limiting. The focus is on correct PostgreSQL backend configuration, proper limiter setup with database storage, and effective resource management.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "PostgresBucket instantiation",
      "description": "Uses PostgresBucket class with appropriate database connection parameters (host, port, database, user, password). Should properly configure the bucket for PostgreSQL storage.",
      "max_score": 25
    },
    {
      "name": "Rate configuration",
      "description": "Creates Rate object with correct limit (10) and interval (1 minute using Duration.MINUTE or equivalent). The rate should be properly configured before limiter creation.",
      "max_score": 15
    },
    {
      "name": "Limiter initialization",
      "description": "Instantiates Limiter with the configured Rate and PostgresBucket. Should properly wire together the rate definition and storage backend.",
      "max_score": 20
    },
    {
      "name": "Rate limit checking",
      "description": "Uses Limiter.try_acquire() method with appropriate parameters (item name/identifier, weight, blocking mode) to check and enforce rate limits. Should use non-blocking mode or handle blocking appropriately.",
      "max_score": 20
    },
    {
      "name": "Bucket flushing",
      "description": "Uses PostgresBucket.flush() method or equivalent to clear rate limit data for a specific API key when resetting limits.",
      "max_score": 10
    },
    {
      "name": "Resource cleanup",
      "description": "Properly closes/disposes PostgresBucket connections using close() or context manager pattern to release database resources.",
      "max_score": 10
    }
  ]
}