Calmcode - neo4j: connect

Connect

1 2 3 4 5 6 7 8 9 10

If you know the port that you're hosting neo4j on, you can also connect via the browser! In our case we could connect via http://localhost:11006/.

You can also connect with python if you'd like. We're using the p2neo python library, but there are many other client libraries as well.

The python library has a welcome feature that allows you to save the results of a neo4j query into a pandas dataframe!

from py2neo import Graph

graph = Graph("bolt://localhost:11005", auth=("neo4j", "test"))

query = """
MATCH p=(source:Project)-[:Dependency *1.. {required: "True"}]->(sink:Project)
WHERE LENGTH(p) = 11
RETURN source.name as source, sink.name as sink, p
LIMIT 100
"""

df = graph.run(query).to_data_frame()