Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions content/develop/clients/redis-py/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ pip install redis[hiredis]

Connect to localhost on port 6379, set a value in Redis, and retrieve it. All responses are returned as bytes in Python. To receive decoded strings, set `decode_responses=True`. For more connection options, see [these examples](https://redis.readthedocs.io/en/stable/examples.html).

{{< note >}}

You can try this code out in a [Jupyter notebook on Binder](https://redis.io/binder/v2/gh/redis/binder-launchers/6bbed3da294e8de5a8c2ad99abf883731a50d4dd?urlpath=%2Fdoc%2Ftree%2Fdemo.ipynb).

{{< /note >}}

```python
r = redis.Redis(host='localhost', port=6379, decode_responses=True)
```
Expand Down Expand Up @@ -76,8 +82,6 @@ r.hgetall('user-session:123')
# {'surname': 'Smith', 'name': 'John', 'company': 'Redis', 'age': '29'}
```



## More information

The [`redis-py`](https://redis.readthedocs.io/en/stable/index.html) website
Expand Down