-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
40 lines (31 loc) · 824 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
32
33
34
35
36
37
38
39
40
import os
class Config:
"""
Set default config values here
e.g. CONFIG_VALUE = os.environ.get('CONFIG_VALUE_ENV_VAR') or 'default value'
"""
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = os.environ.get("SECRET_KEY")
class DevConfig(Config):
"""
Set dev specific config here
"""
SQLALCHEMY_DATABASE_URI = os.environ.get("DEV_DATABASE_URL")
DEBUG = True
class TestConfig(Config):
"""
Set test specific config here
"""
SQLALCHEMY_DATABASE_URI = os.environ.get("TEST_DATABASE_URL")
TESTING = True
class ProdConfig(Config):
"""
Set prod specific config here
"""
SQLALCHEMY_DATABASE_URI = os.environ.get("PROD_DATABASE_URL")
config = {
"dev": DevConfig,
"test": TestConfig,
"prod": ProdConfig,
"default": ProdConfig,
}