skillfed

fakeredis

Python implementation of redis API, can be used for testing purposes.

fakeredis Permissive license BSD-3-Clause Active 452 v2.37.0 released

Install

fakeredis on PyPI

pip

pip install fakeredis

uv

uv add fakeredis

poetry

poetry add fakeredis

Package 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

Development Status :: 5 - Production/StableDevelopment Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

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
redis mock testingin-memory redis replacementredis protocol pythonfake redis serverredis testing without serverredis-py drop-in replacementasync redis mock

Similar packages