-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
26 lines (20 loc) · 705 Bytes
/
Copy pathconfig.py
File metadata and controls
26 lines (20 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import json
class Config(object):
def __init__(self):
self.data_manager_class_name = 'DataManagerSQLAlchemy'
self.data_manager_params = ['postgresql+psycopg2://stock:stock@localhost/stock']
self.data_feed_class_name = 'DataFeedIB'
self.data_feed_params = [10001]
self.engine_class_name = 'EngineOnline'
self.engine_params = [['./strategies']]
if os.path.exists('config.json'):
with open('config.json') as fin:
config_dict = json.load(fin)
pass
for k, v in config_dict.items():
setattr(self, k, v)
pass
pass
pass
pass