summaryrefslogtreecommitdiff
path: root/docs/index.rst
diff options
context:
space:
mode:
authorChayim <chayim@users.noreply.github.com>2021-12-09 09:49:35 +0200
committerGitHub <noreply@github.com>2021-12-09 09:49:35 +0200
commit12c17bfc436ea6784bbc8b2d327d981520858eb7 (patch)
tree40cb053e6a10bffe70f528132265225c969b4467 /docs/index.rst
parenta58f4235e554cb50b312caf1a9076114c77d0529 (diff)
downloadredis-py-12c17bfc436ea6784bbc8b2d327d981520858eb7.tar.gz
Adding cluster, bloom, and graph docs (#1779)v4.1.0rc2
Diffstat (limited to 'docs/index.rst')
-rw-r--r--docs/index.rst20
1 files changed, 15 insertions, 5 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 8e243f3..d088708 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -16,21 +16,30 @@ redis-py can be installed using pip via ``pip install redis``.
Quickly connecting to redis
-************
+***************************
There are two quick ways to connect to Redis.
-Assuming you run Redis on localhost:6379 (the default)::
+**Assuming you run Redis on localhost:6379 (the default)**
+
+.. code-block:: python
+
import redis
r = redis.Redis()
r.ping()
-Running redis on foo.bar.com, port 12345::
+**Running redis on foo.bar.com, port 12345**
+
+.. code-block:: python
+
import redis
r = redis.Redis(host='foo.bar.com', port=12345)
r.ping()
-Another example with foo.bar.com, port 12345::
+**Another example with foo.bar.com, port 12345**
+
+.. code-block:: python
+
import redis
r = redis.from_url('redis://foo.bar.com:12345')
r.ping()
@@ -47,7 +56,8 @@ Redis Command Functions
.. toctree::
:maxdepth: 2
- redis_core_commands
+ redis_commands
+ redis_cluster_commands
sentinel_commands
redismodules