-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
52 lines (34 loc) · 1.11 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
"""App environment configurations."""
import os
from dotenv import load_dotenv
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
load_dotenv(dotenv_path)
class Development():
"""Model Development enviroment config object."""
DEBUG = True
DEVELOPMENT = True
SQLALCHEMY_DATABASE_URI = os.environ.get('LOCAL_DATABASE')
SQLALCHEMY_TRACK_MODIFICATIONS = True
class Testing():
"""Model Testing environment config object."""
DEBUG = True
TESTING = True
SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE')
SQLALCHEMY_TRACK_MODIFICATIONS = True
class Staging():
"""Model Development enviroment config object."""
DEBUG = True
STAGING = True
SQLALCHEMY_DATABASE_URI = os.environ.get('STAGING_DATABASE')
SQLALCHEMY_TRACK_MODIFICATIONS = True
class Production():
"""Model Development enviroment config object."""
DEBUG = True
PRODUCTION = True
SQLALCHEMY_DATABASE_URI = os.environ.get('PRODUCTION_DATABASE')
env_configuration = {
'development': Development,
'testing': Testing,
'staging': Staging,
'production': Production
}