<filename>webapp/blueprints/helper/data_manager.py
from neo4j import GraphDatabase, basic_auth
driver = GraphDatabase.driver("bolt://hobby-jemomenbpiokgbkeepnkiodl.dbs.graphenedb.com:24787", auth=basic_auth("magicspanarchian", "<KEY>"))


def print_friends_of(tx, name):
    for record in tx.run("MATCH (a:Person)-[:KNOWS]->(f) "\
                         "WHERE a.name = {name} "\
                         "RETURN f.name", name=name):
        print("record : "+record["f.name"])

with driver.session() as session:
    session.read_transaction(print_friends_of, "Alice")