redis_wrap
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-py
Examples
Example of list wrapper:
bears = get_list('bears')
bears.append('grizzly')
assert len(bears) == 1
assert 'grizzly' in bears
Example of hash wrapper:
villains = get_hash('villains')
assert 'riddler' not in villains
villains['riddler'] = 'Edward Nigma'
assert 'riddler' in villains
assert len(villains.keys()) == 1
del villains['riddler']
assert len(villains) == 0
Example of set wrapper:
fishes = get_set('fishes')
assert 'nemo' not in fishes
fishes.add('nemo')
assert 'nemo' in fishes
for item in fishes:
assert item == 'nemo'
Copyright: 2010 by amix License: BSD.
Release files for redis_wrap 1.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| redis_wrap-1.4.5.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redis_wrap-1.4.5-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 18.5 kB
Release files / redis_wrap-1.4.5.tar.gz
| Download URL | redis_wrap-1.4.5.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
781c3af55075c27bbb068ecf4dd4366d56fcdff0332dc32e402f9ff5282c332c
|
|
BLAKE2b-256 checksum How to use checksums |
d16e0f5e61a4f7e63a799e194d932294f1c573bd91c5da8751f96459f6711ce7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / redis_wrap-1.4.5-py2.7.egg
| Download URL | redis_wrap-1.4.5-py2.7.egg |
|---|---|
| Size | 13.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
1b7b7f936e34f3543faf5d663251e2d96642d4d44db1c95dc4cde46b4a49b629
|
|
BLAKE2b-256 checksum How to use checksums |
70441f9006981a601f538d1870975938155d6ce81cc5846e54c3aba1e7898902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |