redis_wrapA wrapper for Redis datatypes so they mimic the datatypes found in Python | |
Download |
redis_wrap Ranking & Summary
Advertisement
redis_wrap Tags
redis_wrap Description
A wrapper for Redis datatypes so they mimic the datatypes found in Python redis_wrap is a Python library that Implements a wrapper for Redis datatypes so they mimic the datatypes found in Python.Requires Redis 2.0+ and newest version of redis-py.For best performance the wrappers are lazy and use direct Redis calls. E.g. __len__ of list wrapper is implemented by calling llen.redis-py can be downloaded from here: * http://github.com/andymccurdy/redis-pyExamplesExample of list wrapper:bears = get_list('bears')bears.append('grizzly')assert len(bears) == 1assert 'grizzly' in bearsExample of hash wrapper:villains = get_hash('villains')assert 'riddler' not in villainsvillains = 'Edward Nigma'assert 'riddler' in villainsassert len(villains.keys()) == 1del villainsassert len(villains) == 0Example of set wrapper:fishes = get_set('fishes')assert 'nemo' not in fishesfishes.add('nemo')assert 'nemo' in fishesfor item in fishes: assert item == 'nemo' Requirements: · Python
redis_wrap Related Software