-
Notifications
You must be signed in to change notification settings - Fork 155
redis‐py
redis-py
is the main client library for Python.
Docs home | https://redis.io/docs/latest/develop/clients/redis-py/ |
Github repo | https://github.com/redis/redis-py |
Doc examples branch | master |
Doc examples folder | doctests |
Unlike some of the other clients, there is no particular naming convention for the
example files here (except for a .py
suffix, of course). You can run a script to
test the examples after installing the requirements as described in the doctests
README.md file.
You should run all the formatting and linting checks mentioned in the README, because the CI for the repo will reject files that fail them. In particular, they are picky about the length of code lines (88 character maximum at the time of writing) and the number of blank lines and space between code elements (function definitions, constructs, comments, etc) . If you use VSCode, you can install extensions (eg, Flake8) that detect violations live as you type, so you can usually fix problems before the PR stage. Be prepared to split function parameter lists and dictionary definitions into separate lines, put long comments before of after the code lines they refer to, and split long strings into concatenated chunks. Use the existing docs for examples of how to do this that have already passed the CI (eg, JSON filter examples).