Skip to content

Commit

Permalink
Add more documentation about encoding of strings (#1417)
Browse files Browse the repository at this point in the history
Additional docs about string encoding/decoding
  • Loading branch information
felipou authored Nov 9, 2020
1 parent 66973e4 commit 1345dc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------------------
Expand Down

0 comments on commit 1345dc4

Please sign in to comment.