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.
Let us see how to explore Python code using Pycograph and RedisGraph below:
The redislabs/redismod Docker image provides you all the essential Redis modules.
We will be using a popular Docker compose project for our sample python code. Clone the Docker Compose project repository
Load your project's code with the pycograph load command:
Open RedisInsight, select RedisGraph on the left menu and run the below query:
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