{"repo":"redis/fastapi-redis-sdk","free":true,"listed":false,"github":"https://github.com/redis/fastapi-redis-sdk","clone":"git clone https://github.com/redis/fastapi-redis-sdk.git","description":"FastAPI SDK for Redis","language":"Python","stars":345,"topics":["cache","fastapi","redis","sdk","webframework"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Official FastAPI integration for Redis Idiomatic Redis integration for FastAPI - connection management and DI-based caching with automatic key consistency. Features - Fluent setup — FastAPIRedis(app).lifespan().caching() configures pools and caching in one chain, attaching to the FastAPI lifespan events - Dependency injection — cache() , cache evict() , cache put() as Depends() factories, plus CacheBackend for complex invalidation and conditional logic - HTTP-native caching — ETag , 304 Not Modified , Cache-Control directives out of the box - Rate limiting — rate limit() dependency with a fluent rate language ( \"10/second\" ), X-RateLimit- / Retry-After headers, and distributed per-client counters - Testable — full dependency overrides support; no need for monkey-patching - Pydantic-validated configuration — fully configurable via environment variables or via an .env file Requirements Dependency Supported versions -------------- -------------------- Python 3.10 to 3.14 FastAPI 0.115+ redis-py 6.0+ Pydantic 2.0+ Redis server 7.4+ Installation Caching Cache GET responses with a dependency — on a hit the endpoint is skipped, on a miss the response is stored after it returns: cache evict() and cache put() handle invalidation and write-through with matching keys, and CacheBackendDep exposes imperative get / set / delete / has / delete group for conditional logic. Cached responses carry X-Redis-Cache (HIT/MISS), Cache-Control , and ETag headers with 304 Not Modified support. See the","default_branch":null,"files":null,"tree":[],"storefront":"/r/redis","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/redis/fastapi-redis-sdk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}