from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient
from azure.common.credentials import UserPassCredentials
import cfg

c = cfg.read_cfg()

subscription_id = c['txtkey']

import json
import cfg

c = cfg.read_cfg()

sub_id = c['txtkey']

key = "Ocp-Apim-Subscription-Key:" + sub_id
content = "Content - Type: application / json"
accept = "Accept: application / json"

Add json headers