CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-requests-cache

tessl install tessl/pypi-requests-cache@1.2.0

A persistent cache for python requests

Agent Success

Agent success rate when using this tile

76%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.27x

Baseline

Agent success rate without this tile

60%

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer integrates requests-cache with requests-oauthlib and requests-mock to build a cached OAuth client. The focus is on proper use of CachedSession with OAuth2Session, correct cache configuration, and effective use of mocking for testing.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CachedSession usage",
      "description": "Uses requests_cache.CachedSession (or install_cache) as the primary caching mechanism rather than implementing custom caching logic.",
      "max_score": 25
    },
    {
      "name": "OAuth2Session integration",
      "description": "Properly integrates requests_oauthlib.OAuth2Session with the cached session, either by wrapping OAuth2Session or using a custom session that inherits from both.",
      "max_score": 25
    },
    {
      "name": "Backend configuration",
      "description": "Correctly configures a cache backend (e.g., SQLiteCache, RedisCache) using the cache_name and cache_backend parameters, demonstrating understanding of backend selection.",
      "max_score": 15
    },
    {
      "name": "Cache management",
      "description": "Implements cache clearing functionality using CachedSession.cache.clear() or similar methods to selectively manage cached responses.",
      "max_score": 10
    },
    {
      "name": "requests-mock integration",
      "description": "Uses requests_mock.Adapter or requests_mock.Mocker to create test mocks that work with the cached session, verifying caching behavior without real network calls.",
      "max_score": 15
    },
    {
      "name": "Cache key handling",
      "description": "Demonstrates awareness that authenticated requests are cached with their full context (including auth headers), either through correct usage or appropriate cache configuration.",
      "max_score": 10
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/requests-cache@1.2.x
tile.json