hishel
Elegant HTTP Caching for Python
What it is and what it does
Hishel is an HTTP caching library that brings RFC 9111-compliant caching to Python HTTP clients. It integrates with HTTPX, Requests, ASGI applications, and FastAPI, allowing you to cache HTTP responses with minimal code changes. The library supports both synchronous and asynchronous workflows, making it suitable for a range of Python applications from simple scripts to complex async services.
The package uses msgpack for serialization and provides SQLite as its storage backend. It includes configurable caching policies, streaming support to avoid loading large payloads into memory, and specialized support for caching GraphQL queries. Hishel is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities.
Use it for:
- Cache HTTP responses from external APIs in web applications to reduce latency and bandwidth.
- Integrate caching into FastAPI or ASGI applications to improve performance of downstream requests.
- Cache GraphQL query results with body-sensitive content matching to avoid redundant server calls.
- Add transparent caching to existing HTTPX or Requests-based clients with minimal code changes.
- Build async services that need efficient HTTP response caching without manual cache management.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Hishel is an HTTP caching library for Python that implements RFC 9111 specifications, providing RFC-compliant caching integration for popular HTTP clients like HTTPX, Requests, ASGI, and FastAPI with both synchronous and asynchronous support.
Yes. Hishel is a well-maintained, actively developed library with low install friction, permissive licensing, and no known vulnerabilities. It fills a clear need for RFC 9111-compliant HTTP caching in Python. The recent release cycle, active repository, and support for modern Python versions (3.10–3.14) make it production-ready. Install it if you need HTTP caching for HTTPX, Requests, FastAPI, or ASGI applications.
Install
hishel on PyPI
pip
pip install hisheluv
uv add hishelpoetry
poetry add hishelInstalling hishel
Before you install
Low install friction with only two runtime dependencies (msgpack and typing-extensions). The package is actively maintained with a recent release (4 days old) and steady repository activity, making it reliable for production use.
License in practice
Licensed under a permissive BSD license, allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install hishel
import hishel
from hishel import CacheConnectionPool
# Use with HTTPX or other supported HTTP clients
with CacheConnectionPool() as pool:
response = pool.request('GET', 'https://example.com')
Requires Python 3.10 or later; SQLite backend is the current storage option.
Verify before relying
- Specific performance benchmarks or overhead metrics compared to uncached requests.
- Details on which ASGI frameworks (Starlette, Litestar, BlackSheep) are officially tested.
- Cache eviction policies and memory limits for long-running applications.
- Whether GraphQL caching handles mutations and subscriptions or queries only.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — msgpack, typing-extensions |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,771,227/month — #2,041 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hishel-1.3.1-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
httpxthrottlecacheWraps HTTPX with built-in rate limiting and…
unclear · top 15,000 on PyPI
linear-apiA Python wrapper for the Linear API that…
permissive · top 15,000 on PyPI
requests-cacheAdds persistent HTTP caching to the requests…
permissive · top 5,000 on PyPI
aiohttp-client-cacheAdds transparent request caching to…
permissive · top 15,000 on PyPI
aiohttp-asgi-connectorProvides an AIOHTTP connector that lets you…
permissive · top 15,000 on PyPI
fastapi-cache2Caches FastAPI endpoint and function results…
permissive · top 5,000 on PyPI
httpx2HTTPX2 is a fully featured HTTP client library…
permissive · top 1,000 on PyPI
nab-indexA typed PyPI Simple-API client with on-disk…
permissive · top 15,000 on PyPI
opentelemetry-util-httpProvides ASGI and WSGI middleware and HTTP…
permissive · top 1,000 on PyPI