Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 7514ec8

Browse files
committed
Minor update to simples example inside README.md
1 parent 0c6361c commit 7514ec8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ Small sample script that shows how to get started with RedisCluster. It can also
5252
>>> from rediscluster import RedisCluster
5353

5454
>>> # Requires at least one node for cluster discovery. Multiple nodes is recommended.
55-
>>> startup_nodes = [{"host": "127.0.0.1", "port": "7000"}]
56-
55+
>>> startup_nodes = [{"host": "127.0.0.1", "port": "7000"}, {"host": "127.0.0.1", "port": "7001"}]
5756
>>> rc = RedisCluster(startup_nodes=startup_nodes, decode_responses=True)
5857

58+
# Or you can use the simpler format of providing one node same way as with a Redis() instance
59+
<<< rc = RedisCluster(host="127.0.0.1", port=7000, decode_responses=True)
60+
5961
>>> rc.set("foo", "bar")
6062
True
6163
>>> print(rc.get("foo"))

0 commit comments

Comments
 (0)