-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
31 lines (29 loc) · 805 Bytes
/
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
import os
class App:
__config = {
'events_url': 'http://cal.nashvl.org/events.atom',
'parser': {
'content_key': 'content',
'content_value': 'value',
'listings_key': 'entries',
'start_key': 'start_time',
'title_key': 'title',
'url_key': 'link',
},
'time': {
'timezone_offset': -5,
'end_of_day_offset': +15, # this assumes the script runs at 9am
},
'twitter': {
'consumer_key': os.environ['CONSUMER_KEY'],
'consumer_secret': os.environ['CONSUMER_SECRET'],
'access_token': os.environ['ACCESS_TOKEN'],
'access_token_secret': os.environ['ACCESS_TOKEN_SECRET'],
},
}
@staticmethod
def config(key, key2=False):
if key2:
return App.__config[key][key2]
else:
return App.__config[key]