def content(self): variables = data_handler.get_variables() vars = [Variable(name=var, type=data_handler.get_type(var)) for var in variables] return render_template("variables.html", variables=vars, viewid=self.viewid)
def variables_stream(): while True: vars = [{"name": var, "type": data_handler.get_type(var)} for var in data_handler.get_variables()] yield json.dumps({"data": vars}) time.sleep(.1)
def variables(): vars = [{"name": var, "type": data_handler.get_type(var)} for var in data_handler.get_variables()] return jsonify({"data": vars})