From 51950930e1c8d8d199981a991e945315e240b39f Mon Sep 17 00:00:00 2001 From: paoloredis Date: Mon, 23 Jun 2025 15:53:56 +0200 Subject: [PATCH 1/3] Add link to binderhub environment for Python client example --- content/develop/clients/redis-py/_index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/develop/clients/redis-py/_index.md b/content/develop/clients/redis-py/_index.md index 7abe4a58da..678c798e7b 100644 --- a/content/develop/clients/redis-py/_index.md +++ b/content/develop/clients/redis-py/_index.md @@ -76,6 +76,11 @@ r.hgetall('user-session:123') # {'surname': 'Smith', 'name': 'John', 'company': 'Redis', 'age': '29'} ``` +## Try this out + +You can try this code out in a Jupyter notebook on Binder. + +[![Binder](https://mybinder.org/badge_logo.svg)](https://redis.io/binder/v2/gh/redis/binder-launchers/python-client?urlpath=%2Fdoc%2Ftree%2Fdemo.ipynb) ## More information From a413755c7d7d207a13ed4a480161374402757370 Mon Sep 17 00:00:00 2001 From: paoloredis Date: Mon, 23 Jun 2025 16:32:39 +0200 Subject: [PATCH 2/3] Move text and remove binder badge --- content/develop/clients/redis-py/_index.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/content/develop/clients/redis-py/_index.md b/content/develop/clients/redis-py/_index.md index 678c798e7b..8a0e21ab89 100644 --- a/content/develop/clients/redis-py/_index.md +++ b/content/develop/clients/redis-py/_index.md @@ -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/python-client?urlpath=%2Fdoc%2Ftree%2Fdemo.ipynb). + +{{< /note >}} + ```python r = redis.Redis(host='localhost', port=6379, decode_responses=True) ``` @@ -76,13 +82,6 @@ r.hgetall('user-session:123') # {'surname': 'Smith', 'name': 'John', 'company': 'Redis', 'age': '29'} ``` -## Try this out - -You can try this code out in a Jupyter notebook on Binder. - -[![Binder](https://mybinder.org/badge_logo.svg)](https://redis.io/binder/v2/gh/redis/binder-launchers/python-client?urlpath=%2Fdoc%2Ftree%2Fdemo.ipynb) - - ## More information The [`redis-py`](https://redis.readthedocs.io/en/stable/index.html) website From 2988342b8db95c86db0f5511288abc38c8ea048c Mon Sep 17 00:00:00 2001 From: paoloredis Date: Tue, 24 Jun 2025 11:57:29 +0200 Subject: [PATCH 3/3] Use commit ref instead of branch --- content/develop/clients/redis-py/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/develop/clients/redis-py/_index.md b/content/develop/clients/redis-py/_index.md index 8a0e21ab89..00127e61c6 100644 --- a/content/develop/clients/redis-py/_index.md +++ b/content/develop/clients/redis-py/_index.md @@ -50,7 +50,7 @@ Connect to localhost on port 6379, set a value in Redis, and retrieve it. All re {{< note >}} -You can try this code out in a [Jupyter notebook on Binder](https://redis.io/binder/v2/gh/redis/binder-launchers/python-client?urlpath=%2Fdoc%2Ftree%2Fdemo.ipynb). +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 >}}