Conversation
Add a Jupyter notebook demonstrating sorted set operations including ZADD, ZRANGE, ZRANGEBYSCORE, ZINCRBY, ZRANK/ZREVRANK, ZREM, and ZUNIONSTORE/ZINTERSTORE with a practical leaderboard example.
|
Hi @Br1an67, thank you for your contribution! We will have a look at it. |
There was a problem hiding this comment.
Pull request overview
Adds a new Jupyter notebook to the documentation examples to demonstrate Redis sorted set usage via redis-py, supporting the broader “add more examples” initiative in #1744.
Changes:
- Introduces
docs/examples/sorted_set_examples.ipynbcovering core sorted set commands (ZADD,ZRANGE/ZRANGEBYSCORE,ZINCRBY,ZRANK/ZREVRANK,ZREM,ZUNIONSTORE/ZINTERSTORE) - Includes a practical leaderboard walkthrough using sorted sets
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "source": [ | ||
| "## Connect to Redis\n", | ||
| "\n", | ||
| "To understand what ```decode_responses=True``` does, refer back to [this document](connection_examples.ipynb)" | ||
| ] |
There was a problem hiding this comment.
This new notebook isn’t referenced anywhere in the documentation TOC, so it likely won’t show up in the rendered docs. docs/examples.rst currently lists each notebook explicitly in its toctree, and sorted_set_examples isn’t included there. Add examples/sorted_set_examples to that toctree so the page is discoverable in the published docs.
petyaslavova
left a comment
There was a problem hiding this comment.
Hey @Br1an67, the notebooks looks good. Can you please add reference to it in the docs/examples.rst
Description of change
Added a Jupyter notebook demonstrating Redis sorted set operations. Covers:
ZADDandZRANGEZRANGEBYSCORE— range queries by scoreZINCRBY— score incrementsZRANK/ZREVRANK— rank lookupsZREM— removing membersZUNIONSTORE/ZINTERSTORE— combining sorted setsFollows the same structure and style as the existing example notebooks.
Pull Request check-list
Contributes to #1744
Note
Low Risk
Low risk documentation-only change that adds a new example notebook; no production code paths are modified.
Overview
Adds a new Jupyter notebook
docs/examples/sorted_set_examples.ipynbdemonstrating Redis sorted set usage viaredis-py, includingZADD/ZRANGE, score range queries, score increments, rank lookups, member removal, set union/intersection, and a small leaderboard walkthrough.Written by Cursor Bugbot for commit 99d34bd. This will update automatically on new commits. Configure here.