forked from wicol/safrs-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.py
41 lines (37 loc) · 1006 Bytes
/
base.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
import os
DB_HOST = os.environ['DB_HOST']
DB_USER = os.environ['DB_USER']
DB_PWD = os.environ['DB_PWD']
DB_NAME = os.environ['DB_NAME']
SQLALCHEMY_DATABASE_URI = f'postgresql://{DB_USER}:{DB_PWD}@{DB_HOST}/{DB_NAME}'
SQLALCHEMY_TRACK_MODIFICATIONS = False
# feels dirty to hard code
SWAGGER_HOST = os.getenv('SWAGGER_HOST','172.16.17.12')
SWAGGER_PORT = int(os.getenv('SWAGGER_PORT',1237))
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'default': {
'format': '%(asctime)s %(levelname)s %(name)s: %(message)s'
},
},
'handlers': {
'console': {
'level': 'DEBUG',
'formatter': 'default',
'class': 'logging.StreamHandler',
},
},
'loggers': {
'': {
'handlers': ['console'],
'level': 'WARNING'
},
'app': {
'handlers': ['console'],
'level': 'INFO',
'propagate': False
},
}
}