{"id":26563661,"url":"https://github.com/redisgraph/redisgraph-py","last_synced_at":"2025-05-16T07:05:25.372Z","repository":{"id":34042289,"uuid":"104474221","full_name":"RedisGraph/redisgraph-py","owner":"RedisGraph","description":"RedisGraph python client","archived":false,"fork":false,"pushed_at":"2023-02-08T08:29:55.000Z","size":144,"stargazers_count":189,"open_issues_count":16,"forks_count":49,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-12T05:04:40.540Z","etag":null,"topics":["cypher","graphdatabase","python-client","redis","redisgraph-python-client"],"latest_commit_sha":null,"homepage":"https://redisgraph.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisGraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-22T12:54:38.000Z","updated_at":"2025-04-22T05:40:13.000Z","dependencies_parsed_at":"2025-03-21T10:02:16.937Z","dependency_job_id":"2c4e0f20-740d-41fd-a57a-5cd4ebc81a6d","html_url":"https://github.com/RedisGraph/redisgraph-py","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisGraph","download_url":"https://codeload.github.com/RedisGraph/redisgraph-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485060,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypher","graphdatabase","python-client","redis","redisgraph-python-client"],"created_at":"2025-03-22T16:16:42.445Z","updated_at":"2025-05-16T07:05:20.362Z","avatar_url":"https://github.com/RedisGraph.png","language":"Python","readme":"[![license](https://img.shields.io/github/license/RedisGraph/redisgraph-py.svg)](https://github.com/RedisGraph/redisgraph-py)\n[![PyPI version](https://badge.fury.io/py/redisgraph.svg)](https://badge.fury.io/py/redisgraph)\n[![GitHub issues](https://img.shields.io/github/release/RedisGraph/redisgraph-py.svg)](https://github.com/RedisGraph/redisgraph-py/releases/latest)\n[![Codecov](https://codecov.io/gh/RedisGraph/redisgraph-py/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisGraph/redisgraph-py)\n[![Known Vulnerabilities](https://snyk.io/test/github/RedisGraph/redisgraph-py/badge.svg?targetFile=pyproject.toml)](https://snyk.io/test/github/RedisGraph/redisgraph-py?targetFile=pyproject.toml)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/RedisGraph/redisgraph-py.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/RedisGraph/redisgraph-py/alerts/)\n\n# RedisGraph python client\n[![Forum](https://img.shields.io/badge/Forum-RedisGraph-blue)](https://forum.redis.com/c/modules/redisgraph)\n[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/gWBRT6P)\n\n## Deprecation notice\n\nAs of [redis-py 4.1.0](https://pypi.org/project/redis/4.1.0) this library is deprecated. It's features have been merged into redis-py. Please either install it [from pypy](https://pypi.org/project/redis) or [the repo](https://github.com/redis/redis-py).\n\n--------------------------------\n\n\n\n## Example: Using the Python Client\n\n```python\nimport redis\nfrom redisgraph import Node, Edge, Graph, Path\n\nr = redis.Redis(host='localhost', port=6379)\n\nredis_graph = Graph('social', r)\n\njohn = Node(label='person', properties={'name': 'John Doe', 'age': 33, 'gender': 'male', 'status': 'single'})\nredis_graph.add_node(john)\n\njapan = Node(label='country', properties={'name': 'Japan'})\nredis_graph.add_node(japan)\n\nedge = Edge(john, 'visited', japan, properties={'purpose': 'pleasure'})\nredis_graph.add_edge(edge)\n\nredis_graph.commit()\n\nquery = \"\"\"MATCH (p:person)-[v:visited {purpose:\"pleasure\"}]-\u003e(c:country)\n           RETURN p.name, p.age, v.purpose, c.name\"\"\"\n\nresult = redis_graph.query(query)\n\n# Print resultset\nresult.pretty_print()\n\n# Use parameters\nparams = {'purpose':\"pleasure\"}\nquery = \"\"\"MATCH (p:person)-[v:visited {purpose:$purpose}]-\u003e(c:country)\n           RETURN p.name, p.age, v.purpose, c.name\"\"\"\n\nresult = redis_graph.query(query, params)\n\n# Print resultset\nresult.pretty_print()\n\n# Use query timeout to raise an exception if the query takes over 10 milliseconds\nresult = redis_graph.query(query, params, timeout=10)\n\n# Iterate through resultset\nfor record in result.result_set:\n    person_name = record[0]\n    person_age = record[1]\n    visit_purpose = record[2]\n    country_name = record[3]\n\nquery = \"\"\"MATCH p = (:person)-[:visited {purpose:\"pleasure\"}]-\u003e(:country) RETURN p\"\"\"\n\nresult = redis_graph.query(query)\n\n# Iterate through resultset\nfor record in result.result_set:\n    path = record[0]\n    print(path)\n\n\n# All done, remove graph.\nredis_graph.delete()\n```\n\n## Installing\n\n### Install official release\n\n```\npip install redisgraph\n```\n### Install latest release (Aligned with RedisGraph master)\n\n```\npip install git+https://github.com/RedisGraph/redisgraph-py.git@master\n```\n\n### Install for development in env\n\n1. Create a virtualenv to manage your python dependencies, and ensure it's active.\n   ```virtualenv -v venv; source venv/bin/activate```\n\n2. Install [pypoetry](https://python-poetry.org/) to manage your dependencies.\n   ```pip install poetry```\n\n3. Install dependencies.\n   ```poetry install```\n\n[tox](https://tox.readthedocs.io/en/latest/) runs all code linters as its default target.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisgraph%2Fredisgraph-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredisgraph%2Fredisgraph-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisgraph%2Fredisgraph-py/lists"}