CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-requests-cache

A persistent cache for python requests

76

1.26x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This evaluation assesses the engineer's ability to use requests-cache for thread-safe caching in a concurrent environment. The focus is on proper usage of CachedSession and understanding its built-in thread safety features with RLock.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CachedSession instantiation",
      "description": "Creates a CachedSession instance (from requests_cache module) instead of using regular requests.Session",
      "max_score": 25
    },
    {
      "name": "Thread-safe usage",
      "description": "Uses the same CachedSession instance across multiple threads, leveraging its built-in RLock for thread safety rather than creating separate sessions per thread",
      "max_score": 30
    },
    {
      "name": "Threading implementation",
      "description": "Implements concurrent URL fetching using Python's threading module with multiple threads accessing the shared cache",
      "max_score": 20
    },
    {
      "name": "Cache configuration",
      "description": "Properly configures the CachedSession with appropriate backend (e.g., memory, sqlite) to enable caching functionality",
      "max_score": 15
    },
    {
      "name": "Request execution",
      "description": "Uses CachedSession HTTP methods (e.g., session.get()) to fetch URLs, allowing automatic caching and reuse of responses",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-requests-cache

tile.json