Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class GovernmentSocialMediaAnalyzer(object):
# Class Instance Variable
__cfg = {}
__country_code = None
__api = None
def __init__(self, country_code):
self.__country_code = country_code
# Dependent on the country parameter load the relevant configurations
file_name = "config-"+country_code+".yaml"
with open("../../cfg/"+file_name, 'r') as stream:
try:
self.__cfg= yaml.load(stream)
print(self)
except yaml.YAMLError as exc:
print("Config File ", file_name, " wrong format", exc)
exit(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment