gstepanov | c82391e | 2015-03-17 15:46:36 +0200 | [diff] [blame] | 1 | import yaml |
gstepanov | 725cc30 | 2015-02-09 15:08:06 +0200 | [diff] [blame] | 2 | import os |
| 3 | |
stgleb | 75c7041 | 2015-02-17 02:52:00 +0200 | [diff] [blame] | 4 | |
gstepanov | c82391e | 2015-03-17 15:46:36 +0200 | [diff] [blame] | 5 | def parse_config(file_name): |
| 6 | with open(file_name) as f: |
| 7 | cfg = yaml.load(f.read()) |
| 8 | |
| 9 | return cfg |
| 10 | |
| 11 | |
| 12 | cfg_dict = parse_config(os.path.join(os.path.dirname(__file__), 'config.yaml')) |
| 13 | basedir = cfg_dict['paths']['basedir'] |
| 14 | TEST_PATH = cfg_dict['paths']['TEST_PATH'] |
| 15 | SQLALCHEMY_MIGRATE_REPO = cfg_dict['paths']['SQLALCHEMY_MIGRATE_REPO'] |
| 16 | DATABASE_URI = cfg_dict['paths']['DATABASE_URI'] |
| 17 | CHARTS_IMG_PATH = cfg_dict['paths']['CHARTS_IMG_PATH'] |