dimanche 11 avril 2021

How to connect flask and neo4j graph database and display neo4j data into flask web using html? please help it urgent

from flask import Flask,render_template from py2neo import Graph graph = Graph("bolt://localhost:11008", auth=("neo4j", "d1"))

app = Flask(name)

@app.route('/search', methods=['GET', 'POST']) def search(): if request.method enter code here== "POST": graph = Graph("bolt://localhost:11008", auth=("neo4j", "d1")) graph.run("MATCH (a:Person)RETURN a.name, a.born LIMIT 2").to_table() return render_template("search.html") if name == "main": app.run()

Aucun commentaire:

Enregistrer un commentaire