def get(self, _device_):
#Lookup Company
company = "Flyball-Labs"
assetSearch = company + "_" + _device_ + "_*"
assetFullQueryURL = assetQueryURL + "/" + assetSearch
print(assetFullQueryURL)
try:
response = requests.get(assetFullQueryURL, headers={"Accept" : "application/json"})
jData = response.json()
except:
return "Server Down"
counter = 0
decodedList = []
for row in jData['Row']:
# Decode the key into ascii
#rowKey = base64.b64decode(row['key']).decode('ascii')
dColumn = {}
for cell in row['Cell']:
columnname = base64.b64decode(cell['column']).decode('ascii')
value = base64.b64decode(cell['$']).decode('ascii')
dColumn[columnname] = value
decodedList.append (dColumn)
return jsonify(decodedList)
评论列表
文章目录