Skip to content

Instantly share code, notes, and snippets.

@talfco
Last active February 4, 2019 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talfco/e094310cbe9db9d99f6e07dd5c2a97b1 to your computer and use it in GitHub Desktop.
Save talfco/e094310cbe9db9d99f6e07dd5c2a97b1 to your computer and use it in GitHub Desktop.
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