cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Connecting a graphdb with a Flask app

I have created a database of around 5k users, each with relationships with one another. I also have a flask app, and from the app I need to be able to call certain cypher functions (centrality, shortest path, etc. with the appropriate arguments when it is required) and then display the returned shortest path, or centrality output.

I do not know how to connect to the graphdb neither how to call these functions from within the flask app, and how the data is returned after running the algorithms. I know I can use neovis.js or d3.js to visualize the graphs, but im struggling to figure out how to get the graphs in the first place.

I don't have much experience with neo4j/cypher, so any help is greatly appreciated!

1 REPLY 1

If you want to integrate with a flask app I recommend you start with the python driver. This will let you interact with the database and issue queries, which you'll need to do a lot of to write the kind of app you're describing.

https://neo4j.com/docs/api/python-driver/current/#quick-example

If you haven't worked with graphs before, then even before that, I'd recommend checking out neo4jsandbox.com and working through some examples so you can see how graphs & cypher works. Ultimately what the python driver is going to let you do is connect to the database, and run cypher.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online