fakeredis
Python implementation of redis API, can be used for testing purposes.
Install
fakeredis on PyPI
pip
pip install fakeredisuv
uv add fakeredispoetry
poetry add fakeredisPackage facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — redis, sortedcontainers, typing-extensions |
| Maintenance | actively maintained — 22 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: fakeredis-2.37.0-py3-none-any.whl
Keywords: RedisBloom, RedisJson, RedisTimeSeries, dragonfly, redis, redis-stack, testing, valkey
About fakeredis
from the package's own PyPI description — quoted content, verbatim
<div align="center">
<img src="docs/assets/logo.svg" alt="fakeredis" width="440">
A fast, pure-Python implementation of the Redis protocol — no server required.
PyPI version (image) CI (image) Coverage (image) Downloads (image) Python versions (image) License (image) Open Source Helpers (image)
[Documentation][readthedocs] · [Supported commands][readthedocs] · Changelog ·...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
fakeredis is a pure-Python, in-memory implementation of the Redis protocol that serves as a drop-in replacement for redis-py, enabling Redis-dependent code to run in tests without a server.
Low friction installation with three lightweight runtime dependencies (redis, sortedcontainers, typing-extensions). The package is actively maintained with a recent release 22 days ago and has been stable since 2012.
BSD-3-Clause is a permissive license that allows commercial and private use with minimal restrictions, requiring only preservation of copyright and license notices.
Usage
pip install fakeredis
import fakeredis
r = fakeredis.FakeStrictRedis()
r.set("foo", "bar")
print(r.get("foo")) # b'bar'
Verdict: fakeredis is a mature, actively maintained testing utility with no known vulnerabilities, permissive licensing, and low install friction. It is well-suited for developers who need Redis-compatible in-memory testing without server overhead.
Needs verification
- Whether the optional extras (lua, json, bf, valkey) are commonly needed or if base installation suffices for typical test scenarios
- Performance characteristics compared to actual Redis for large datasets or high-throughput test scenarios
Similar packages
permissive · top 1,000 on PyPI
hiredispermissive · top 1,000 on PyPI
celerypermissive · top 1,000 on PyPI
types-redispermissive · top 1,000 on PyPI
py-key-value-aiopermissive · top 1,000 on PyPI
limitspermissive · top 1,000 on PyPI
kombupermissive · top 1,000 on PyPI
attrspermissive · top 100 on PyPI
portalockerpermissive · top 1,000 on PyPI
rpds-pypermissive · top 100 on PyPI