-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.py
59 lines (46 loc) · 1.29 KB
/
app.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
53
54
55
56
57
58
59
"""
Application
===========
"""
import os
import dash
import dash_bootstrap_components
from flask import Flask
__author__ = "Alex Forsythe, Gayle McAdams, Thomas Mansencal, Nick Shaw"
__copyright__ = "Copyright 2020 Academy of Motion Picture Arts and Sciences"
__license__ = "Academy of Motion Picture Arts and Sciences License Terms"
__maintainer__ = "Academy of Motion Picture Arts and Sciences"
__email__ = "[email protected]"
__status__ = "Production"
__application_name__ = "AMPAS - Apps"
__major_version__ = "0"
__minor_version__ = "1"
__change_version__ = "0"
__version__ = ".".join(
(__major_version__, __minor_version__, __change_version__)
) # yapf: disable
__all__ = ["SERVER", "SERVER_URL", "APP"]
SERVER = Flask(__name__)
"""
*Flask* server hosting the *Dash* app.
SERVER : Flask
"""
SERVER_URL = os.environ.get("AMPAS_APPS_SERVER")
"""
Server url used to construct permanent links for the individual apps.
SERVER_URL : str
"""
APP = dash.Dash(
__application_name__,
external_scripts=os.environ.get("AMPAS_APPS_JS", "").split(","),
external_stylesheets=[
dash_bootstrap_components.themes.BOOTSTRAP,
*os.environ.get("AMPAS_APPS_CSS", "").split(","),
],
server=SERVER,
)
"""
*Dash* app.
APP : Dash
"""
APP.config["suppress_callback_exceptions"] = True