Skip to main content

license PyPI version CircleCI GitHub issues Codecov Known Vulnerabilities

redisgears-py

Forum Discord

RedisGears python client (support python3 only!)

Example: Using the Python Client:

from gearsclient import GearsRemoteBuilder as GearsBuilder
from gearsclient import execute
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 pyredisgears

Notice that the library also need to be installed in RedisGears virtual env.

Developing

  1. Create a virtualenv to manage your python dependencies, and ensure it's active. virtualenv -v venv
  2. Install pypoetry to manage your dependencies. pip install poetry
  3. Install dependencies. poetry install

tox runs all tests as its default target. Running tox by itself will run unit tests. Ensure you have a running redis, with the module loaded.

Metadata

Release files for pyredisgears 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyredisgears 2.0.1
File Size Uploaded
pyredisgears-2.0.1.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyredisgears 2.0.1
File Interpreter ABI Platform
pyredisgears-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / pyredisgears-2.0.1.tar.gz

Download URL pyredisgears-2.0.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b38ae917343c6d90bb030edc3f4bbde8d1a4b933077100f73fec2fe19db0d3f0
BLAKE2b-256 checksum
How to use checksums
1e5c6ed95f970e392e9fea5d58a6f91cb15f9a372a63cb86b44ca07fb53a6e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.8 Darwin/24.2.0

Release files / pyredisgears-2.0.1-py3-none-any.whl

Download URL pyredisgears-2.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6b493195908f9468cc93701db23648c928fd8112ec01743002d35ba63d8ecf4
BLAKE2b-256 checksum
How to use checksums
79a9a4f37e1c8d51b296b508af4d59f78fa8edb77748fd338b8a3bcf7d1998ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.8 Darwin/24.2.0

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page