initial commit - basic api call and filtering of jobs working

This commit is contained in:
dechert
2023-06-14 12:16:25 +02:00
parent dd2fb629f7
commit 9a2f1f7cb8
3 changed files with 82 additions and 1 deletions

19
config_parser.py Normal file
View File

@@ -0,0 +1,19 @@
import yaml
import os
DEFAULT_CONFIG_FILE_NAME = "config.yml"
# if os.environ['ENV'] == 'prod':
# config_file_to_load = "config_prod.yml"
# else:
config_file_to_load = DEFAULT_CONFIG_FILE_NAME
BASE_FODLER = os.path.dirname(os.path.abspath(__file__))
path_to_config = os.path.join(BASE_FODLER, config_file_to_load)
print("opening config file " + path_to_config)
with open(path_to_config, "r") as ymlfile:
cfg = yaml.load(ymlfile, Loader=yaml.FullLoader)
token = cfg["token"]
prod_mode = cfg["prod"]