-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
33 lines (24 loc) · 813 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
import os
class Config:
DEBUG = False
TESTING = False
API_TITLE = "Flask Library"
API_VERSION = "v1"
OPENAPI_VERSION = "3.0.2"
OPENAPI_JSON_PATH = "api-spec.json"
OPENAPI_URL_PREFIX = "/api"
OPENAPI_REDOC_PATH = "/redoc"
OPENAPI_REDOC_URL = (
"https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"
)
OPENAPI_SWAGGER_UI_PATH = "/swagger-ui"
OPENAPI_SWAGGER_UI_URL = "https://cdn.jsdelivr.net/npm/swagger-ui-dist/"
JSON_AS_ASCII = False
SQLALCHEMY_DATABASE_URI = os.getenv(
"DATABASE_URL", "postgresql://postgres:example@localhost/postgres"
).replace("postgres://", "postgresql://")
SQLALCHEMY_TRACK_MODIFICATIONS = False
class DebugConfig(Config):
DEBUG = True
class TestConfig(Config):
TESTING = True