-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
44 lines (34 loc) · 1.07 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
import json
from collections import OrderedDict
class Config:
def __init__(self):
with open('config.json') as config_file:
config = json.load(config_file, object_pairs_hook=OrderedDict)
self._short_delay = config['short_delay']
self._long_delay = config['long_delay']
self._extended_delay = config['extended_delay']
self._codes = config['codes']
self._num_attempts = config['attempts']
self._transmit_pin = config['transmit_pin']
self._application_prefix = config['application_prefix']
@property
def short_delay(self):
return self._short_delay
@property
def long_delay(self):
return self._long_delay
@property
def extended_delay(self):
return self._extended_delay
@property
def codes(self):
return self._codes
@property
def attempts(self):
return self._num_attempts
@property
def transmit_pin(self):
return self._transmit_pin
@property
def application_prefix(self):
return self._application_prefix