-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
90 lines (88 loc) · 2.6 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
from pydash import objects
import process
_config = {
'max_news_age': process.env['MAX_NEWS_AGE'],
'predict': {
'filename': 'predict.json'
},
'msn': {
'api': {
'method': 'get',
'url': {
'root': 'https://www.msn.com/en-us/money/getfilterresponse',
'params': {
'filters' : 'Country|USA',
'ranges' : 'Nmp|0;1000~Mc|1000000000;2000000000',
'sortedby' : 'Mc',
'sortorder' : 'DSC',
'count' : 100,
'offset' : 0,
'market' : 'USA',
'sectype' : 'Stock',
'ver' : '2.0.6436.4302'
}
}
}
},
'yahoo': {
'api': {
'method': 'get',
'url': {
'root': 'https://query1.finance.yahoo.com/v7/finance/chart/',
'ticker': 'AAPL',
'params': {
'corsDomain' : 'finance.yahoo.com',
'includePrePost' : False,
'includeTimestamps' : True,
'indicators' : 'quote',
'interval' : '1m',
'period1' : 1503063000,
'period2' : 1503086400,
}
}
},
'rss': {
'method': 'get',
'url': {
'root': 'http://finance.yahoo.com/rss/headline',
'params': {
's' : 'AAPL'
}
}
}
},
'intrinio': {
'api': {
'method': 'get',
'url': {
'root': 'https://api.intrinio.com/news',
'params': {
'identifier' : 'AAPL'
}
}
}
},
'db': {
'name': 'groundwire',
'connections':
{'production': {
'host': '127.0.0.1',
'port': 5432,
'user': {
'username': process.env['DB_USER'],
'password': process.env['DB_PASS']
}
},
'development': {
'host': '127.0.0.1',
'port': 5432,
'user': {
'username': process.env['DB_USER'],
'password': process.env['DB_PASS']
}
}
}
}
}
def get(path):
return objects.get(_config, path)