Python data structures on top of redis
Go to file
2020-08-21 12:24:31 +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
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_test.py Add List and Counter unit tests 2020-08-21 12:09:04 +02:00
redistructures.py Add ability to delete counter 2020-08-21 12:08:37 +02:00
requirements_dev.txt Add pylint to requirements 2020-08-21 12:24:31 +02:00
requirements.txt Add requirements.txt and test coverage script 2020-08-21 12:19:39 +02:00
run_test_coverage.sh Add requirements.txt and test coverage script 2020-08-21 12:19:39 +02:00

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'