skillfed

py-redis

A convenience wrapper for the official Python redis package

py-redis v1.1.1 346.4K downloads/30d#7,354 on PyPI
Permissive license Abandoned released

What it is and what it does

Py-Redis is a thin wrapper around the official redis Python package that reduces boilerplate for common operations. It wraps the Redis client in a context manager so connections are automatically cleaned up, automatically serializes and deserializes data to JSON on set and get, and provides batch helper methods like get_keys() and set_dict() to work with multiple keys at once using pattern matching.

The package is designed for developers who want simpler Redis usage without manually handling connection lifecycle or JSON encoding. It exposes the underlying redis.Redis object via a .R attribute if you need to fall back to direct client calls. However, the package has not been maintained since its latest release, so it may have compatibility issues with newer versions of redis or Python itself.

Use it for:

  • Caching application data (strings, lists, dicts) with automatic JSON serialization in a context manager.
  • Bulk operations on related Redis keys using pattern matching without writing loops.
  • Quick prototyping or scripts where connection lifecycle management and JSON handling are tedious.
  • Migrating from direct redis client usage to a simpler API without rewriting all calls.
  • Setting and retrieving Python dictionaries and lists directly without manual JSON encoding.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A convenience wrapper around the official Redis Python client that adds automatic JSON serialization, context manager support, and helper methods for working with multiple keys at once.

No, not for new projects. The package is abandoned and offers only convenience features over the official redis client—not critical functionality. For new work, use redis directly or a more actively maintained wrapper. Only consider py-redis if you're maintaining legacy code that already depends on it and have no compatibility issues with your current environment.

Install

py-redis on PyPI

pip

pip install py-redis

uv

uv add py-redis

poetry

poetry add py-redis

Installing py-redis

Before you install

Installation is straightforward with low friction, but the package has been abandoned since its latest release on 2021-12-13. No active maintenance means security issues or compatibility problems would not be addressed.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions.

Quickstart

pip install py-redis

from pyredis import RedisConnection

redis_args = {'host': 'localhost'}
with RedisConnection(**redis_args) as my_redis:
    my_redis.set('key', 'value')
    data = my_redis.get('key')

Requires a running Redis server accessible at the host and port you specify.

Verify before relying

  • Whether the package remains compatible with current versions of redis and Python 3.x releases.
  • Whether JSON serialization handles all data types you need or has edge cases with nested structures.
  • Performance overhead of the wrapper layer compared to direct redis client usage.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 1 — redis
Maintenance abandoned — 1,705 days since the last release
First released
Downloads 346,387/month — #7,354 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: py_redis-1.1.1-py3-none-any.whl

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

Tags

redis wrapper pythonredis json serializationredis context managerredis batch operationsredis key pattern matchingredis convenience layerpython redis helper
redis-wrapperabandoned

More Database packages