-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
37 lines (27 loc) · 822 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
"""Create a Flask configuration."""
import os
from nbaspa.data.endpoints.parameters import SEASONS
ASSETS_DEBUG = False
ASSETS_AUTO_BUILD = True
class Config:
"""Set the configuration."""
STATIC_FOLDER = "static"
TEMPLATES_FOLDER = "templates"
API_TITLE = "NBA SPA web application"
API_VERSION = "v1"
OPENAPI_VERSION = "3.1.0"
# Data location
DATA_DIR = os.environ.get("DATA_DIR")
SEASONS = {key: value for key, value in SEASONS.items() if key != "2005-06"}
class DevelopmentConfig(Config):
"""Development configuration."""
FLASK_ENV = "development"
DEBUG = True
TESTING = True
FILESYSTEM = "file"
class ProductionConfig(Config):
"""Production configuration."""
FLASK_ENV = "production"
DEBUG = False
TESTING = False
FILESYSTEM = "gcs"