def fetch_dp(uid, datapoint): """Function for handling /fetch/agent/<uid>/<datapoint> route. Args: uid: Unique Identifier of an Infoset Agent Returns: JSON response of all data under specific datapoint """ # TODO implement start and stop times config = infoset.config['GLOBAL_CONFIG'] data = GetIDX(datapoint, config) data_values = data.everything() # Gets all associated datapoints """ x_axis = [] y_axis = [] for key, value in data_values.items(): x_axis.append(key) y_axis.append(value) np_x_axis = np.asarray(x_axis) np_y_axis = np.asarray(y_axis) plt.plot(np_x_axis, np_y_axis) plt.savefig("/home/proxima/public_html/graph.png") """ return jsonify(data_values)
def fetch_dp(uid, datapoint): """Function for handling /fetch/agent/<uid>/<datapoint> route. Args: uid: Unique Identifier of an Infoset Agent Returns: JSON response of all data under specific datapoint """ # TODO implement start and stop times data = GetIDX(datapoint) data_values = data.everything() # Return return jsonify(data_values)