-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
38 lines (30 loc) · 1.04 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
"""Flask app configurations."""
class Config:
"""
Configuration class for the application.
"""
DEBUG = True
DATABASE_URI = "./data_streaming_client/data/processed/bitcoin_rate_tracker.db"
TEST_DATABASE_URI = "./data/bitcoin_rate_tracker.db"
HOST = "127.0.0.1"
PORT = "5051"
PROJECT_HOME = "/workspaces/bitcoin-rate-tracker"
ETL_DIRECTORY = "/workspaces/bitcoin-rate-tracker/data_streaming_client"
ETL_ENTRYPOINT = "setup_etl_web_server.sh"
def get_config_value(self, key):
"""
Get the value of a configuration option.
Args:
key (str): The configuration option key.
Returns:
Any: The value of the configuration option.
"""
return getattr(self, key)
def set_config_value(self, key, value):
"""
Set the value of a configuration option.
Args:
key (str): The configuration option key.
value (Any): The value to be set for the configuration option.
"""
setattr(self, key, value)