summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Machado <462154+felipou@users.noreply.github.com>2020-11-09 05:07:45 -0300
committerGitHub <noreply@github.com>2020-11-09 00:07:45 -0800
commit1345dc48874e10d895e87ddbaba3f8b6e679d833 (patch)
tree03d63d26246aecde59287933ba000c8d85796e51
parent66973e4e6cdeb9bc7d71966ca14717a1bdbddec2 (diff)
downloadredis-py-1345dc48874e10d895e87ddbaba3f8b6e679d833.tar.gz
Add more documentation about encoding of strings (#1417)
Additional docs about string encoding/decoding
-rw-r--r--README.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 389d5b4..a4b6e16 100644
--- a/README.rst
+++ b/README.rst
@@ -75,6 +75,12 @@ specify `decode_responses=True` to `Redis.__init__`. In this case, any
Redis command that returns a string type will be decoded with the `encoding`
specified.
+The default encoding is "utf-8", but this can be customized with the `encoding`
+argument to the `redis.Redis` class. The `encoding` will be used to
+automatically encode any strings passed to commands, such as key names and
+values. When `decode_responses=True`, string data returned from commands
+will be decoded with the same `encoding`.
+
Upgrading from redis-py 2.X to 3.0
----------------------------------