Open umairsiddiqui-digitek opened 4 years ago
i was looking into 16 - Calling APIs/call_api.py. i think SUBSCRIPTION_KEY in 16 - Calling APIs/call_api.py should be in separate config (like .ini) file:
16 - Calling APIs/call_api.py
SUBSCRIPTION_KEY
config.ini:
config.ini
[KEYS] SUBSCRIPTION_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
then in call_api.py, we can get the SUBSCRIPTION_KEY from .ini file
call_api.py
.ini
import configparser config = configparser.ConfigParser() config.read('config.ini') SUBSCRIPTION_KEY = config['KEYS']['SUBSCRIPTION_KEY']
i was looking into
16 - Calling APIs/call_api.py
. i thinkSUBSCRIPTION_KEY
in16 - Calling APIs/call_api.py
should be in separate config (like .ini) file:config.ini
:then in
call_api.py
, we can get theSUBSCRIPTION_KEY
from.ini
file