Skip to content

Commit

Permalink
doc:improve
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jan 26, 2024
1 parent 3d5a97e commit 12c8820
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pip install fakeredis[lua] ## Support for LUA scripts

pip install fakeredis[json] ## Support for RedisJSON commands

pip install fakeredis[probabilistic,json] ## Support for RedisJSON and BloomFilter/CuckooFilter commands
pip install fakeredis[probabilistic,json] ## Support for RedisJSON and BloomFilter/CuckooFilter/CountMinSketch commands
```

## How to Use
Expand Down
29 changes: 27 additions & 2 deletions docs/redis-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ most likely in the set, but it is not guaranteed.
Currently, RedisBloom module bloom filter commands are fully implemented using [pybloom-live][5](
see [supported commands][6]).

You can install it using `pip install 'fakeredis[bf]'`.
You can install it using `pip install 'fakeredis[probabilistic]'`.

```pycon
>>> import fakeredis
Expand All @@ -51,6 +51,27 @@ You can install it using `pip install 'fakeredis[bf]'`.
0
```

## [Count-Min Sketch][8] support

Count-min sketch is a probabilistic data structure that estimates the frequency of an element in a data stream.

You can install it using `pip install 'fakeredis[probabilistic]'`.

```pycon
>>> import fakeredis
>>> r = fakeredis.FakeStrictRedis()
>>> r.cms().initbydim("cmsDim", 100, 5)
OK
>>> r.cms().incrby("cmsDim", ["foo"], [3])
[3]
```

## [Cuckoo filter][9] support

Cuckoo filters are a probabilistic data structure that checks for the presence of an element in a set

You can install it using `pip install 'fakeredis[probabilistic]'`.

## [Redis programmability][7]

Redis provides a programming interface that lets you execute custom scripts on the server itself. In Redis 7 and beyond,
Expand All @@ -72,4 +93,8 @@ Lua), you will need [lupa](https://pypi.org/project/lupa/), you can install it u

[6]:./redis-commands/BloomFilter/

[7]:https://redis.io/docs/interact/programmability/
[7]:https://redis.io/docs/interact/programmability/

[8]:https://redis.io/docs/data-types/probabilistic/count-min-sketch/

[9]:https://redis.io/docs/data-types/probabilistic/cuckoo-filter/

0 comments on commit 12c8820

Please sign in to comment.