You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following functions can be used to replicate their equivalent `Redis command <https://redis.io/commands>`_. Generally they can be used as functions on your redis connection. For the simplest example, see below:
The following `Redis commands <https://redis.io/commands>`_ are available within a `Redis Cluster <https://redis.io/topics/cluster-tutorial>`_. Generally they can be used as functions on your redis connection.
Copy file name to clipboardExpand all lines: docs/connections.rst
+33-2Lines changed: 33 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,41 @@ Connecting to Redis
3
3
4
4
Generic Client
5
5
**************
6
-
.. autoclass:: redis.client.Redis
6
+
7
+
This is the client used to connect directly to a standard redis node.
8
+
9
+
.. autoclass:: redis.Redis
10
+
:members:
11
+
12
+
Sentinel Client
13
+
***************
14
+
15
+
Redis `Sentinel <https://redis.io/topics/sentinel>`_ provides high availability for Redis. There are commands that can only be executed against a redis node running in sentinel mode. Connecting to those nodes, and executing commands against them requires a Sentinel connection.
16
+
17
+
Connection example (assumes redis redis on the ports listed below):
Copy file name to clipboardExpand all lines: docs/redismodules.rst
+59-56Lines changed: 59 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -3,63 +3,49 @@ Redis Modules Commands
3
3
4
4
Accessing redis module commands requires the installation of the supported `Redis module <https://docs.redis.com/latest/modules/>`_. For a quick start with redis modules, try the `Redismod docker <https://hub.docker.com/r/redislabs/redismod>`_.
5
5
6
-
RedisTimeSeries Commands
7
-
************************
8
6
9
-
These are the commands for interacting with the `RedisTimeSeries module <https://redistimeseries.io>`_. Below is a brief example, as well as documentation on the commands themselves.
7
+
RedisBloom Commands
8
+
*******************
10
9
10
+
These are the commands for interacting with the `RedisBloom module <https://redisbloom.io>`_. Below is a brief example, as well as documentation on the commands themselves.
11
11
12
-
**Create a timeseries object with 5 second retention**
These are the commands for interacting with the `RedisJSON module <https://redisjson.io>`_. Below is a brief example, as well as documentation on the commands themselves.
17
+
filter= redis.bf().create("bloom", 0.01, 1000)
18
+
filter.add("bloom", "foo")
29
19
30
-
**Create a json object**
20
+
**Create and add to a cuckoo filter**
31
21
32
22
.. code-block:: python
33
23
34
24
import redis
35
-
r = redis.Redis()
36
-
r.json().set("mykey", ".", {"hello": "world", "i am": ["a", "json", "object!"]}
37
-
38
-
39
-
.. automodule:: redis.commands.json.commands
40
-
:members: JSONCommands
25
+
filter= redis.cf().create("cuckoo", 1000)
26
+
filter.add("cuckoo", "filter")
41
27
42
-
-----
28
+
**Create Count-Min Sketch and get information**
43
29
44
-
RediSearch Commands
45
-
*******************
30
+
.. code-block:: python
46
31
47
-
These are the commands for interacting with the `RediSearch module <https://redisearch.io>`_. Below is a brief example, as well as documentation on the commands themselves.
32
+
import redis
33
+
r = redis.cms().initbydim("dim", 1000, 5)
34
+
r.cms().incrby("dim", ["foo"], [5])
35
+
r.cms().info("dim")
48
36
49
-
**Create a search index, anddisplay its information**
@@ -92,45 +78,62 @@ These are the commands for interacting with the `RedisGraph module <https://redi
92
78
.. automodule:: redis.commands.graph.commands
93
79
:members: GraphCommands
94
80
95
-
-----
81
+
------
96
82
97
-
RedisBloom Commands
98
-
*******************
83
+
RedisJSON Commands
84
+
******************
99
85
100
-
These are the commands for interacting with the `RedisBloom module <https://redisbloom.io>`_. Below is a brief example, as well as documentation on the commands themselves.
86
+
These are the commands for interacting with the `RedisJSON module <https://redisjson.io>`_. Below is a brief example, as well as documentation on the commands themselves.
101
87
102
-
**Create and add to a bloom filter**
88
+
**Create a json object**
103
89
104
90
.. code-block:: python
105
91
106
92
import redis
107
-
filter= redis.bf().create("bloom", 0.01, 1000)
108
-
filter.add("bloom", "foo")
93
+
r= redis.Redis()
94
+
r.json().set("mykey", ".", {"hello": "world", "i am": ["a", "json", "object!"]}
109
95
110
-
**Create and add to a cuckoo filter**
111
96
112
-
.. code-block:: python
97
+
.. automodule:: redis.commands.json.commands
98
+
:members: JSONCommands
113
99
114
-
import redis
115
-
filter= redis.cf().create("cuckoo", 1000)
116
-
filter.add("cuckoo", "filter")
100
+
-----
117
101
118
-
**Create Count-Min Sketch and get information**
102
+
RediSearch Commands
103
+
*******************
104
+
105
+
These are the commands for interacting with the `RediSearch module <https://redisearch.io>`_. Below is a brief example, as well as documentation on the commands themselves.
106
+
107
+
**Create a search index, and display its information**
These are the commands for interacting with the `RedisTimeSeries module <https://redistimeseries.io>`_. Below is a brief example, as well as documentation on the commands themselves.
126
+
127
+
128
+
**Create a timeseries objectwith5 second retention**
0 commit comments