def jsonprocess(): with engine.connect() as connection: data = Data() #get json file for node tree raw_data = data.query_node_information(connection) jsontree = Jsontree() jsontree.get_jsonfile_tree_node(raw_data) flash("get json file for node tree") # get json file for equipment ddtree raw_data = data.query_equipment_cost(connection) jsontree = Jsontree() jsontree.get_jsonfile_ddtree_equipment(raw_data) flash("get json file for equipment ddtree") #get json file for equipment tree node_data = data.query_equipment(connection) jsontree = Jsontree() jsontree.get_jsonfile_tree_equipment(node_data) #get json file fro node infomation raw_data = data.query_node_information(connection) jsondata= Jsontree() jsondata.get_jsonfile_parallel(raw_data) flash("get json file fro node infomation") #get json file for forcegraph raw_data = data.query_equipment(connection) jsondata= Jsontree() jsondata.get_jsonfile_forcegraph(raw_data) #get json file for nodeforcegraph raw_data = data.query_node_information(connection) jsontree = Jsontree() jsontree.get_jsonfile_nodeforcegraph(raw_data) flash("get json file for nodeforcegraph") connection.close() flash("Connection Closed!") return True
def test(): engine = ConnectDatabase().connect_sqlalchemy() connection = engine.connect() data = Data() raw_data = data.query_equipment_cost(connection) return "Test data"