Would appreciate some help stress testing our service with MS Azure language analytics.
API Key and example code below for any tinkerers out there.
In B4 not your personal army
payload = {}
payload_sublevel = [{'id': id, 'text': text}]
payload['documents'] = payload_sublevel
url = "https://westeurope.api.cognitive.microsoft.com/text/analytics/v2.0/languages"
headers = {
'ocp-apim-subscription-key': "830fba7b90da4d9dafc90ee8f6791cab",
'content-type': "application/json",
'accept': "application/json",
}
response = requests.request("POST", url, data=json.dumps(payload), headers=headers)
return json.loads(response.text)