Skip to main content

RedisGears Python Client

Project description

license PyPI version CircleCI GitHub issues Codecov Language grade: Python

redisgears-py

Forum

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gearsclient, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size gearsclient-1.0.1.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page