skillfed

hishel

Elegant HTTP Caching for Python

hishel v1.3.1 5.8M downloads/30d#2,041 on PyPI404
Permissive license Active released

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 hishel

uv

uv add hishel

poetry

poetry add hishel

Installing 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

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentFramework :: AsyncIOFramework :: TrioIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTP

Tags

HTTP caching library PythonRFC 9111 compliant cachingHTTPX Requests cachingasync HTTP cacheFastAPI ASGI cachingSQLite HTTP cacheGraphQL query caching
http-cachingrfc-9111async-support

More WWW/HTTP packages