Код: Выделить всё
myfunc(key, value['client_id'], value['client_secret'])
TypeError: string indices must be integers
Код: Выделить всё
def myfunc(myval1, myval2, myval3):
config.ms_auth[TENANT] = myval1
config.ms_auth[CLIENT_ID] = myval2
config.ms_auth[CLIENT_SECRET] = myval3;
>
with RequestManager(total_indicators, logger) as request_manager:
logger.info("Start uploading Data")
request_manager.upload_indicators(parsed_indicators)
logger.info("Finished uploading indicators")
def main():
tenants = json.loads(config.mydict)
for key, value in tenants.items():
myfunc(key, value['client_id'], value['client_secret'])
'''mydict = {
'tenant': 'abcd',
'client_id': 'customerid',
'cleint_secret' : 'password'
}'''
будем очень признательны за любые идеи..
Подробнее здесь: https://stackoverflow.com/questions/786 ... dictionary