summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2016-09-06 12:35:01 -0400
committerGitHub <noreply@github.com>2016-09-06 12:35:01 -0400
commitac9370f05a86e59f46ad8bf492ece891b4cbb097 (patch)
tree6b41aa32b3f8c408e91c769b6a0d7476bcc84be8
parent2ca3ffdc2102ecca1e7e419428706c29684ab38e (diff)
parent69002968b0f8204adf19c6d81dec22af567b7844 (diff)
downloadredis-py-ac9370f05a86e59f46ad8bf492ece891b4cbb097.tar.gz
Merge pull request #645 from cvrebert/redis-url
Link to redis:// & rediss:// scheme IANA registrations in docs
-rwxr-xr-xredis/client.py5
-rwxr-xr-xredis/connection.py11
2 files changed, 12 insertions, 4 deletions
diff --git a/redis/client.py b/redis/client.py
index bfcb0f8..c7b1fb3 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -453,7 +453,10 @@ class StrictRedis(object):
@classmethod
def from_url(cls, url, db=None, **kwargs):
"""
- Return a Redis client object configured from the given URL.
+ Return a Redis client object configured from the given URL, which must
+ use either `the ``redis://`` scheme
+ <http://www.iana.org/assignments/uri-schemes/prov/redis>`_ for RESP
+ connections or the ``unix://`` scheme for Unix domain sockets.
For example::
diff --git a/redis/connection.py b/redis/connection.py
index 27db42a..ed051a3 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -785,9 +785,14 @@ class ConnectionPool(object):
unix://[:password]@/path/to/socket.sock?db=0
Three URL schemes are supported:
- redis:// creates a normal TCP socket connection
- rediss:// creates a SSL wrapped TCP socket connection
- unix:// creates a Unix Domain Socket connection
+
+ - ```redis://``
+ <http://www.iana.org/assignments/uri-schemes/prov/redis>`_ creates a
+ normal TCP socket connection
+ - ```rediss://``
+ <http://www.iana.org/assignments/uri-schemes/prov/rediss>`_ creates a
+ SSL wrapped TCP socket connection
+ - ``unix://`` creates a Unix Domain Socket connection
There are several ways to specify a database number. The parse function
will return the first specified option: