Skip to main content

Pythonic wrapper for Redis Client.

Project description

rediswrapper is a pythonic wrapper of Redis Client for end users. The whole storage acts like a python dict as well as its child storage values.


  • The root client support dict-like operations

  • Python object wrappers for list, set, hash type values

  • Implicit serialization and deserialization when storing and fetching data


From PyPI:

pip install rediswrapper

From GitHub:

git clone
cd rediswrapper
pip install .


rediswrapper will try to serialize non-sting values and store them in redis and deserialize them when fetching back.

All redis value types are mocked with respective python objects and support all standard methods as the builtin types.

>>> import rediswrapper
>>> redis = rediswrapper.RedisDict()
# String value
>>> redis['a'] = 'hello'
# int value
>>> redis['b'] = 2
>>> dict(redis)
{'a': 'hello', 'b': 2}
# Picklable object
>>> import datetime
>>> redis['c'] =
# List value
>>> redis['d'] = list(range(5))
>>> redis['d'].append(0)
>>> redis['d']
ListType value([0, 1, 2, 3, 4, 0])
# Hash value
>>> redis['e'] = {'a': 1, 'b': 2}
>>> redis['e'].get('a')
# Set value
>>> redis['f'] = set([1, 2])
>>> redis['f'].add(3)
>>> redis['f']
SetType value([1, 2, 3])

To inspect those value types, one should use the ABCs defined in collections module.

>>> from collections import Mapping
>>> isinstance(redis['e'], Mapping)


  • Drop support for Python older than 3.6

  • Drop support for Python 3.3

  • Fix a vulnerability issue that cause users run arbitrary scripts.


This work is open-sourced under the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rediswrapper-0.4.0.post1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

rediswrapper-0.4.0.post1-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page