Name | pyredisgears JSON |
Version |
2.0.1
JSON |
| download |
home_page | None |
Summary | RedisGears Python Client |
upload_time | 2025-01-01 06:05:29 |
maintainer | None |
docs_url | None |
author | Redis |
requires_python | <3.12,>=3.9 |
license | BSD-3-Clause |
keywords |
redis
json
extension
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![license](https://img.shields.io/github/license/RedisGears/redisgears-py.svg)](https://github.com/RedisGears/redisgears-py)
[![PyPI version](https://badge.fury.io/py/redisgears-py.svg)](https://badge.fury.io/py/redisgears-py)
[![CircleCI](https://circleci.com/gh/RedisGears/redisgears-py/tree/master.svg?style=svg)](https://circleci.com/gh/RedisGears/redisgears-py/tree/master)
[![GitHub issues](https://img.shields.io/github/release/RedisGears/redisgears-py.svg)](https://github.com/RedisGears/redisgears-py/releases/latest)
[![Codecov](https://codecov.io/gh/RedisGears/redisgears-py/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisGears/redisgears-py)
[![Known Vulnerabilities](https://snyk.io/test/github/RedisGears/redisgears-py/badge.svg?targetFile=pyproject.toml)](https://snyk.io/test/github/RedisGears/redisgears-pytargetFile=pyproject.toml)
# redisgears-py
[![Forum](https://img.shields.io/badge/Forum-RedisGears-blue)](https://forum.redis.com/c/modules/redisgears)
[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/6yaVTtp)
[RedisGears](http://redisgears.io) python client (support python3 only!)
## Example: Using the Python Client:
```python
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](https://python-poetry.org/) to manage your dependencies.
```pip install poetry```
3. Install dependencies.
```poetry install```
[tox](https://tox.readthedocs.io/en/latest/) 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "pyredisgears",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.9",
"maintainer_email": null,
"keywords": "Redis JSON Extension",
"author": "Redis",
"author_email": "oss@redis.com",
"download_url": "https://files.pythonhosted.org/packages/1e/5c/6ed95f970e392e9fea5d58a6f91cb15f9a372a63cb86b44ca07fb53a6e38/pyredisgears-2.0.1.tar.gz",
"platform": null,
"description": "[![license](https://img.shields.io/github/license/RedisGears/redisgears-py.svg)](https://github.com/RedisGears/redisgears-py)\n[![PyPI version](https://badge.fury.io/py/redisgears-py.svg)](https://badge.fury.io/py/redisgears-py)\n[![CircleCI](https://circleci.com/gh/RedisGears/redisgears-py/tree/master.svg?style=svg)](https://circleci.com/gh/RedisGears/redisgears-py/tree/master)\n[![GitHub issues](https://img.shields.io/github/release/RedisGears/redisgears-py.svg)](https://github.com/RedisGears/redisgears-py/releases/latest)\n[![Codecov](https://codecov.io/gh/RedisGears/redisgears-py/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisGears/redisgears-py)\n[![Known Vulnerabilities](https://snyk.io/test/github/RedisGears/redisgears-py/badge.svg?targetFile=pyproject.toml)](https://snyk.io/test/github/RedisGears/redisgears-pytargetFile=pyproject.toml)\n\n# redisgears-py\n[![Forum](https://img.shields.io/badge/Forum-RedisGears-blue)](https://forum.redis.com/c/modules/redisgears)\n[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/6yaVTtp)\n\n[RedisGears](http://redisgears.io) python client (support python3 only!)\n\n## Example: Using the Python Client:\n```python\nfrom gearsclient import GearsRemoteBuilder as GearsBuilder\nfrom gearsclient import execute\nimport redis\n\nconn = redis.Redis(host='localhost', port=6379)\n\n# count for each genre how many times it appears\n\nres = GearsBuilder('KeysOnlyReader', r=conn).\\\n\t map(lambda x:execute('hget', x, 'genres')).\\\n\t filter(lambda x:x != '\\\\N').\\\n\t flatmap(lambda x: x.split(',')).\\\n\t map(lambda x: x.strip()).\\\n\t countby().\\\n\t run()\n\n\nfor r in res[0]:\n\tprint('%-15s: %d' % (r['key'], r['value']))\n```\n\n## Installing\n```\npip install pyredisgears\n```\nNotice that the library also need to be installed in RedisGears virtual env.\n\n## Developing\n\n1. Create a virtualenv to manage your python dependencies, and ensure it's active.\n ```virtualenv -v venv```\n2. Install [pypoetry](https://python-poetry.org/) to manage your dependencies.\n ```pip install poetry```\n3. Install dependencies.\n ```poetry install```\n\n[tox](https://tox.readthedocs.io/en/latest/) 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.\n\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "RedisGears Python Client",
"version": "2.0.1",
"project_urls": {
"repository": "https://github.com/RedisGears/redisgears-py",
"url": "https://redisgears.io"
},
"split_keywords": [
"redis",
"json",
"extension"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "79a9a4f37e1c8d51b296b508af4d59f78fa8edb77748fd338b8a3bcf7d1998ea",
"md5": "5c80b98dfc1ed78f066e0b1d312861da",
"sha256": "e6b493195908f9468cc93701db23648c928fd8112ec01743002d35ba63d8ecf4"
},
"downloads": -1,
"filename": "pyredisgears-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5c80b98dfc1ed78f066e0b1d312861da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.9",
"size": 5161,
"upload_time": "2025-01-01T06:05:26",
"upload_time_iso_8601": "2025-01-01T06:05:26.699182Z",
"url": "https://files.pythonhosted.org/packages/79/a9/a4f37e1c8d51b296b508af4d59f78fa8edb77748fd338b8a3bcf7d1998ea/pyredisgears-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1e5c6ed95f970e392e9fea5d58a6f91cb15f9a372a63cb86b44ca07fb53a6e38",
"md5": "9bda628e417dabaf9463ccee11ee4d95",
"sha256": "b38ae917343c6d90bb030edc3f4bbde8d1a4b933077100f73fec2fe19db0d3f0"
},
"downloads": -1,
"filename": "pyredisgears-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "9bda628e417dabaf9463ccee11ee4d95",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.9",
"size": 4614,
"upload_time": "2025-01-01T06:05:29",
"upload_time_iso_8601": "2025-01-01T06:05:29.013237Z",
"url": "https://files.pythonhosted.org/packages/1e/5c/6ed95f970e392e9fea5d58a6f91cb15f9a372a63cb86b44ca07fb53a6e38/pyredisgears-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 06:05:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RedisGears",
"github_project": "redisgears-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"circle": true,
"tox": true,
"lcname": "pyredisgears"
}