Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Implementation of Redis API in python without having a server running. Fully compatible with using redis-py.
| Date | Stars |
|---|---|
| 2026-07-24 | 451 |
| 2026-07-25 | 451 |
| 2026-07-28 | 451 |
| 2026-07-30 | 451 |
| 2026-08-06 | 451 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
35.0
growth rate 0.00%/day
<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.
[](https://pypi.org/project/fakeredis/)
[](https://github.com/cunla/fakeredis-py/actions/workflows/test.yml)
[](https://github.com/cunla/fakeredis-py/actions/workflows/test.yml)
[](https://pypi.org/project/fakeredis/)
[](https://pypi.org/project/fakeredis/)
[](./LICENSE)
[](https://www.codetriage.com/cunla/fakeredis-py)
[**Documentation**][readthedocs] · [**Supported commands**][readthedocs] · [**Changelog**](./docs/about/changelog.md) · [**Sponsor**](https://github.com/sponsors/cunla)
</div>
---
**fakeredis** is a drop-in replacement for [redis-py][redis-py] and [valkey-py][valkey-py] that runs entirely
in-memory. Write tests that depend on [Redis][redis], [Valkey][valkey], [DragonflyDB][dragonflydb], or
[KeyDB][keydb] — without spinning up a real server, a container, or a network connection.
```python
import fakeredis
r = fakeredis.FakeStrictRedis()
r.set("foo", "bar")
r.get("foo") # b'bar'
```
That's it. No server to install, no port to manage, no teardown.
## ✨ Why fakeredis?
- 🚀 **Zero setup** — no Redis server, Docker, or network required. Pure Python.
- 🔌 **Drop-in compatible** — same API as `redis.Redis` and `redis.asyncio.Redis`.
- ⚡ **Fast & isolated** — in-memory, so tests run quickly and start from a clean slate.
- 🧩 **Multi-backend** — emulate Redis, Valkey, DragonflyDB, or KeyDB, and pin a specific server version.
- 📦 **Redis Stack support** — JSON, Bloom/Cuckoo filters, TimeSeries, and Geo commands.
- 🤝 **Share or isolate state** — one shared in-memory server across clients, or independent servers per test.
## 📥 Installation
```bash
pip install fakeredis
```
Optional extras enable additional command families:
```bash
pip install "fakeredis[lua]" # EVAL / EVALSHA scripting
pip install "fakeredis[json]" # JSON.* commands
pip install "fakeredis[bf]" # Bloom / Cuckoo / Count-Min / Top-K filters
pip install "fakeredis[probabilistic]" # alias for the probabilistic filters
pip install "fakeredis[valkey]" # Valkey client compatibility
```
## 🚀 Quickstart
**Use it like `redis.Redis`:**
```python
import fakeredis
r = fakeredis.FakeStrictRedis()
r.lpush("queue", "a", "b", "c")
r.lrange("queue", 0, -1) # [b'c', b'b', b'a']
```
**Share one in-memory server between clients:**
```python
server = fakeredis.FakeServer()
r1 = fakeredis.FakeStrictRedis(server=server)
r2 = fakeredis.FakeStrictRedis(server=server)
r1.set("greeting", "hello")
r2.get("greeting") # b'hello' — same underlying data
```
**Async is supported too:**
```python
import fakeredis
async def main():
r = fakeredis.FakeAsyncRedis()
await r.set("foo", "bar")
await r.get("foo") # b'bar'
```
**Pin a server type and version:**
```python
# Behave like Redis 6...
r = fakeredis.FakeStrictRedis(version=6)
# ...or like Valkey
r = fakeredis.FakeStrictRedis(server_type="valkey")
```
### Using it in tests (pytest)
```python
import pytest
import fakeredis
@pytest.fixture
def redis_client():
return fakeredis.FakeStrictRedis()
def test_cache_set(redis_client):
redis_client.set("user:1", "alice")
assert redis_client.get("user:1") == b"alice"
```
See the [official documentation][readthedocs] for the full list of supported commands and configuration options.
## ❤️ Sponsor
fakeredis-py is develExcerpt of 4,667 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:eb4ba0a2bb938335, topic:testing