-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
38 lines (34 loc) · 1006 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
class Config:
# database configurations
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:rootpassword@db/DealershipDB'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SWAGGER = {
'title': 'Dealership API',
'uiversion': 3
}
# debug mode
DEBUG = True
# JWT configurations
JWT_SECRET_KEY = 'secret_key'
JWT_ACCESS_TOKEN_EXPIRES = 3600
# swagger configurations
SWAGGER = {
'title': 'My API',
'uiversion': 3,
"openapi": "3.0.2",
"specs_route": "/",
"components": {
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
},
"security": [{"BearerAuth": []}]
}
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:rootpassword@localhost:3307/DealershipDB'
JWT_SECRET = 'secret_key'