redis-cli
A Redis Python Client
What it is and what it does
redis-cli is a thin initialization layer over redis-py that centralizes connection setup and exposes a shared Redis instance via a singleton getter. Instead of managing connection pooling and initialization logic in your application, you call init_from_url() or init_from_redis() once at startup, then retrieve the same client instance everywhere with get_redis(). It supports standard Redis URLs, Sentinel URLs with master/slave routing, Unix sockets, and environment variable overrides—useful for Kubernetes deployments where credentials come from secrets.
The package does not wrap or modify redis-py's API; the object returned by get_redis() is the unmodified Redis class from redis-py itself, so all redis-py features and methods work directly. This design aims for forward compatibility across redis-py versions. The main value is reducing boilerplate for connection initialization and providing a clean way to inject Redis configuration from environment variables in containerized environments.
Use it for:
- Initialize Redis once at application startup and access it globally without passing connection objects through function arguments.
- Deploy to Kubernetes with Redis credentials injected via secrets, using REDISCLI_URL and REDISCLI_AUTH environment variables.
- Switch between standard Redis, Redis Sentinel, and Unix socket connections by changing only the initialization URL, not application code.
- Simplify testing by re-initializing redis_cli with a test Redis instance without modifying the rest of your codebase.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a lightweight wrapper around redis-py that simplifies initialization and connection management, exposing the underlying Redis client through a shared singleton instance.
Yes, if you are starting a new project and want to reduce Redis initialization boilerplate. No, if you need active maintenance or forward compatibility guarantees—the package is dormant since October 2023 and may not work with future redis-py releases. Consider it for small, self-contained applications where you control the redis-py version; avoid it for production systems requiring long-term support.
Install
redis-cli on PyPI
pip
pip install redis-cliuv
uv add redis-clipoetry
poetry add redis-cliInstalling redis-cli
Before you install
Low install friction with a single runtime dependency on redis. Maintenance is dormant—last release was 2023-10-02 and no commits since then—so expect no active support or updates for emerging redis-py versions.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, typical for open-source Python tools.
Quickstart
pip install redis-cli
import redis_cli
redis_cli.init_from_url('redis://localhost:6379')
from redis_cli import get_redis
get_redis().set('foo', 'bar')
get_redis().get('foo')
Requires redis-py to be installed (declared as a runtime dependency); requires a running Redis server or Sentinel instance to connect to.
Verify before relying
- Whether the package remains compatible with current redis-py versions given its dormant maintenance status since 2023-10-02.
- Whether the borg pattern initialization truly handles concurrent access safely in production workloads.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — redis |
| Maintenance | dormant — 1,047 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 91,289/month — #13,528 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: redis_cli-1.0.1-py3-none-any.whl
Keywords: Redis, Python, client
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
flask-redisIntegrates Redis into Flask applications as a…
unclear · top 15,000 on PyPI
Redis-Sentinel-UrlParses redis:// and redis+sentinel:// URLs and…
permissive · top 15,000 on PyPI
py-redisA convenience wrapper around the official Redis…
permissive · top 15,000 on PyPI
walrusWalrus extends the redis-py client with…
unclear · top 15,000 on PyPI
hiredishiredis wraps the C hiredis library to parse…
permissive · top 1,000 on PyPI
coredisAn async Redis client with full type hints,…
permissive · top 5,000 on PyPI
fakeredisfakeredis provides an in-memory, pure-Python…
permissive · top 1,000 on PyPI
valkey-glideValkey GLIDE is an official async and sync…
permissive · top 5,000 on PyPI
valkeyPython client library for connecting to and…
permissive · top 5,000 on PyPI