Skip to content

docs: add hash examples notebook - #4154

Open
baraiz wants to merge 3 commits into
redis:masterfrom
baraiz:master
Open

docs: add hash examples notebook#4154
baraiz wants to merge 3 commits into
redis:masterfrom
baraiz:master

Conversation

@baraiz

@baraiz baraiz commented Jun 26, 2026

Copy link
Copy Markdown

Relates to #1744

Added a new hash_examples.ipynb notebook to docs/examples/ covering
the most common Redis Hash operations:

  • hset / hget (single and multiple fields)
  • hgetall, hkeys, hvals, hlen
  • hexists
  • hincrby
  • hdel

Note

Low Risk
Documentation-only changes with no library or runtime behavior impact.

Overview
Adds Redis Hash documentation alongside the other example notebooks by introducing hash_examples.ipynb and wiring it into the Examples toctree.

The notebook walks through common hash operations with redis-py (hset/hget, mapping, hgetall, hkeys/hvals/hlen, hexists, hincrby, hdel) using a user:1 profile example, plus a final delete cleanup step.

Reviewed by Cursor Bugbot for commit 6adfa64. Bugbot is set up for automated code reviews on this repo. Configure here.

@jit-ci

jit-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@jit-ci

jit-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@petyaslavova petyaslavova left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @baraiz, thank you for your contribution! The notebook looks good, but need to be exposed through docs/examples.rst. Can you please add a reference to it there? Thanks!

@baraiz

baraiz commented Jun 27, 2026

Copy link
Copy Markdown
Author

Hi @petyaslavova, I've added the reference to docs/examples.rst in a second commit. Please let me know if anything else is needed!

@petyaslavova petyaslavova left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@petyaslavova

Copy link
Copy Markdown
Collaborator

Hey @baraiz, the docs pipeline is failing with the following error:
Notebook error: NoSuchKernel in examples/hash_examples.ipynb: No such kernel named python3 make: *** [Makefile:45: html] Error 2 make: Leaving directory '/home/runner/work/redis-py/redis-py/docs'
Can you please check?

@petyaslavova

Copy link
Copy Markdown
Collaborator

Hey @baraiz, I was able to identify why the docs building fails.
The docs are built with nbsphinx (docs/conf.py lists it in extensions). No nbsphinx_execute value is set, so it uses the default "auto": nbsphinx executes any notebook that has no saved cell outputs, and skips execution for notebooks that already contain outputs.
All existing notebooks in docs/examples/ have saved cell outputs, except this one, so the building tries to execute it and fails.
So the solution is to execute it and keep the outputs.

@petyaslavova petyaslavova left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the status of the PR, based on the last comment I added.

@Brumbelow

Copy link
Copy Markdown
Contributor

Since this has been quiet for a few weeks I picked it up in #4228 — kept @baraiz's commits and executed the notebook so the outputs are saved and the docs build passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants