skillfed

redis-cli

A Redis Python Client

redis-cli v1.0.1 91.3K downloads/30d#13,528 on PyPI1
Permissive license DORMANT released

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-cli

uv

uv add redis-cli

poetry

poetry add redis-cli

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

redis python client wrapperredis connection initializationredis singleton patternredis sentinel url parsingkubernetes redis config
redis-clientconnection-poolingkubernetes-ready

More Database packages