Skip to main content

Pythonic wrapper for Redis Client.

Project description

# Redis Wrapper > A Pythonic Wrapper of Redis Client

[![PyPI](]( [![Build Status](]( [![Coverage Status](](

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.

## Installation From PyPI: `bash pip install rediswrapper ` From GitHub `bash git clone cd rediswrapper python install `

## Usage `python >>> 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'] = 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') 1 # Set value >>> redis['f'] = set([1, 2]) >>> redis['f'].add(3) >>> redis['f'] SetType value([1, 2, 3]) ` RedisDict will try to serialize non-sting values and store them in redis and unserialize them when fetching back.

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

To inspect those value types, one should use the ABCs defined in collections module. `python >>> from collections import Mapping >>> isinstance(redis['e'], Mapping) True `

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.2.0.tar.gz (4.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page