Python data structures on top of redis
Go to file
Michal Szczepanski 460e4281a4 Add pylint check, fix documentation and pylint issues 2020-08-21 12:48:22 +02:00
example Update README and example with more detailed information 2020-08-17 17:26:08 +02:00
.gitignore Add requirements.txt and test coverage script 2020-08-21 12:19:39 +02:00
.pylintrc Add pylint check, fix documentation and pylint issues 2020-08-21 12:48:22 +02:00
LICENSE Add LICENSE and README.md 2020-08-17 12:16:49 +02:00
README.md Update README and example with more detailed information 2020-08-17 17:26:08 +02:00
redistructures.py Add pylint check, fix documentation and pylint issues 2020-08-21 12:48:22 +02:00
redistructures_test.py Add pylint check, fix documentation and pylint issues 2020-08-21 12:48:22 +02:00
requirements.txt Add requirements.txt and test coverage script 2020-08-21 12:19:39 +02:00
requirements_dev.txt Add pylint to requirements 2020-08-21 12:24:31 +02:00
run_lint.sh Add pylint check, fix documentation and pylint issues 2020-08-21 12:48:22 +02:00
run_test_coverage.sh Add requirements.txt and test coverage script 2020-08-21 12:19:39 +02:00

README.md

redistructures ?

Description

Dictionary, List, Set, Queue, Counter implemented in python with redis data store under the hood

Examples

All examples in example/structures.py

Dictionary example :

from redistructures import Struct
d = Struct.dictionary('hey')
d['x'] = 'y'
d['w'] = 'v'
print(d['x'])
print('x' in d)
print('q' in d)
for k in d.keys():
    print(k)
for v in d.values():
    print(v)
for k, v in d.items():
    print(k, v)

output

b'y'
True
False
b'dict:x'
b'dict:w'
b'y'
b'v'
b'dict:x' b'y'
b'dict:w' b'v'

After next run

d = Struct.dictionary('hey')
for k, v in d.items():
    print(k, v)

output

b'dict:x' b'y'
b'dict:w' b'v'