Redis is phasing out RedisGraph. This blog post explains the motivation behind this decision and the implications for existing Redis customers and community members.
End of support is scheduled for January 31, 2025.
Beginning with Redis Stack 7.2.x-y, Redis Stack will no longer include graph capabilities (RedisGraph).
Pycograph is an open source tool that creates a RedisGraph model of your Python code. The tool lets you to explore your Python codebase with graph queries. With Pycograph, you can query the python code with Cypher. Additionally, it is possible to visualize the graph model using RedisInsight.
The project is hosted over https://pycograph.com/ and package is available in PyPI repository. It was introduced for the first time by Reka Horvath during RedisConf 2021.
Let us see how to explore Python code using Pycograph and RedisGraph below:
curl -sSL https://get.docker.com/ | sh
pip install pycograph
The redis/redis-stack Docker image provides you all the essential Redis modules.
docker run -d -p 6379:6379 redis/redis-stack
docker run -d -v redisinsight:/db -p 8001:8001 redislabs/redisinsight:latest
We will be using a popular Docker compose project for our sample python code. Clone the Docker Compose project repository
git clone https://github.com/docker/compose
Load your project's code with the pycograph load command:
pycograph load --project-dir compose
Results:
Graph successfully updated.
{'graph name': 'compose', 'nodes added': 2428, 'edges added': 11239}
Open RedisInsight, select RedisGraph on the left menu and run the below query:
MATCH (n) RETURN n
You will see the below output:
A query returning exactly one node using the unique full_name property. Double-click on the node to display all its relationships.
Functions called by the Docker Compose top level commands up and run