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!

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.

If you haven't worked with graphs before, then even before that, I'd recommend checking out 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.