RedisGears Python Client
Project description
redisgears-py
RedisGears python client (support python3 only!)
Example: Using the Python Client:
from gearsclient import GearsRemoteBuilder as GearsBuilder
import redis
conn = redis.Redis(host='localhost', port=6379)
# count for each genre how many times it appears
res = GearsBuilder('KeysOnlyReader', r=conn).\
map(lambda x:execute('hget', x, 'genres')).\
filter(lambda x:x != '\\N').\
flatmap(lambda x: x.split(',')).\
map(lambda x: x.strip()).\
countby().\
run()
for r in res[0]:
print('%-15s: %d' % (r['key'], r['value']))
Installing
pip install git+https://github.com/RedisGears/redisgears-py.git
Notice that the library also need to be installed in RedisGears virtual env.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gearsclient-1.0.0.tar.gz
(6.8 kB
view details)
File details
Details for the file gearsclient-1.0.0.tar.gz.
File metadata
- Download URL: gearsclient-1.0.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.18rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61a28f1236f4c121b3af7d43ada0399c3d9edcf90e65596c7027c058b092fad9
|
|
| MD5 |
66e53dd6d9e6005394ffee3f71e92fa3
|
|
| BLAKE2b-256 |
977bd01f4310487b68a0fd74e7eed5c2e5f3165b836fdb7cf3daecc923745193
|