-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.py
50 lines (40 loc) · 1.14 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
"""
Application
===========
"""
import dash
import os
from colour.hints import Optional
from flask import Flask
__author__ = "Colour Developers"
__copyright__ = "Copyright 2018 Colour Developers"
__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"
__maintainer__ = "Colour Developers"
__email__ = "[email protected]"
__status__ = "Production"
__application_name__ = "Colour - Dash"
__major_version__ = "0"
__minor_version__ = "2"
__change_version__ = "7"
__version__ = ".".join(
(__major_version__, __minor_version__, __change_version__)
)
__all__ = ["SERVER", "SERVER_URL", "APP"]
SERVER: Flask = Flask(__name__)
"""
*Flask* server hosting the *Dash* app.
"""
SERVER_URL: Optional[str] = os.environ.get("COLOUR_DASH_SERVER")
"""
Server url used to construct permanent links for the individual apps.
"""
APP: dash.Dash = dash.Dash(
__application_name__,
external_scripts=os.environ.get("COLOUR_DASH_JS", "").split(","),
external_stylesheets=os.environ.get("COLOUR_DASH_CSS", "").split(","),
server=SERVER, # pyright: ignore
)
"""
*Dash* app.
"""
APP.config["suppress_callback_exceptions"] = True