Agensgrap4jupyter
A tool to visualize graph database queries from Neo4j in the Jupyter Notebook.
Install
pip install agensgraph4jupyter
Docs
First thing you must do is call the agensgraph4jupyter.init_notebook_mode()
to load all the javascript.
import agensgraph4jupyter
agensgraph4jupyter.init_notebook_mode()
Then execute a query using [iomedhealth/agensgraph] and give the result to the draw()
function.
import agensgraph
conn = agensgraph.connect("dbname=my_db")
cur = conn.cursor()
cur.execute("SET graph_path=my_graph;")
cur.execute("""
MATCH
(p1 {id: 123456}),
(p2 {id: 373205}),
path=shortestpath((p1)-[*1..8]->(p2))
RETURN path;
""")
agensgraph4jupyter.draw(cur.fetchall())
Licence
The MIT License (MIT) | See LICENSE.md
Copyright (c) 2018 IOMED Medical Solutions S.L