CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pylibmc

Quick and small memcached client for Python

86

1.03x
Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "Evaluates how the solution uses pylibmc's atomic counter APIs to build a counter service, covering initialization, increments, decrements, bulk updates, TTL handling, and reads tied to the memcached backend.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Atomic increments",
      "description": "Uses pylibmc Client.incr with the provided delta to increase counters instead of read/modify/write, handling NotFound by retrying after seeding the key.",
      "max_score": 25
    },
    {
      "name": "Missing-key seeding",
      "description": "Initializes absent counters via pylibmc add (or equivalent atomic create) at zero with the configured default_ttl before applying increments or decrements.",
      "max_score": 20
    },
    {
      "name": "Decrement floor",
      "description": "Uses pylibmc Client.decr for reductions and relies on its zero floor semantics, correctly handling NotFound by seeding first instead of allowing negative values.",
      "max_score": 20
    },
    {
      "name": "Bulk adjustments",
      "description": "bulk_bump iterates over the mapping and applies per-key incr/decr calls (with seeding as needed) rather than batching via non-atomic set_multi, returning updated counts from the atomic calls.",
      "max_score": 15
    },
    {
      "name": "Creation TTL",
      "description": "Applies default_ttl when creating new counters (e.g., add(..., time=default_ttl)) so first-time writes honor the configured expiry.",
      "max_score": 10
    },
    {
      "name": "Counter reads",
      "description": "Retrieves counts via pylibmc get or counter primitives and returns the provided default on cache miss without mutating storage.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-pylibmc

tile.json