Skip to content

Instantly share code, notes, and snippets.

@pavelzag
Created September 5, 2019 19:46
Show Gist options
  • Save pavelzag/d79a445ee166f9cb7d5fa64f6a16fa17 to your computer and use it in GitHub Desktop.
Save pavelzag/d79a445ee166f9cb7d5fa64f6a16fa17 to your computer and use it in GitHub Desktop.
import os
import yaml
def get_config(parameter_name):
home = os.getcwd()
config_file_path = os.path.join(home, 'app_config.yml')
with open(config_file_path, 'r') as ymlfile:
cfg = yaml.load(ymlfile)
return cfg[parameter_name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment