def calc_req_tag_val(cls, req): "(dimention, (tag,value)) pairs" ph_id = req.get("ph_id") log(json.loads(req.get("data"))) entries = cls.__entry_list(json.loads(req.get("data"))) cats = Dimentions.get_dim_and_met(req, req.get("time")) result = {"aggregate": {}, "timeline": {}} for i in ["aggregate", "timeline"]: res = result[i] stat = cats[i] for c in stat: typ = slashify(ph_id, c[0]) if typ in res: logging.error(" the string should be unique for a single request:" + typ) res[typ] = {c[1]: entries} return result