Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUBSCRIPTION_KEY in 16 - Calling APIs/call_api.py should be in separate config (like .ini) file #14

Open
umairsiddiqui-digitek opened this issue Sep 26, 2019 · 0 comments

Comments

@umairsiddiqui-digitek
Copy link

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:

config.ini:

[KEYS]
SUBSCRIPTION_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"

then in call_api.py, we can get the SUBSCRIPTION_KEY from .ini file

import configparser
config = configparser.ConfigParser()
config.read('config.ini')
SUBSCRIPTION_KEY = config['KEYS']['SUBSCRIPTION_KEY']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant