Files
dash-api/main.py

29 lines
702 B
Python

# initial commit
from dash import Dash
from dash_bootstrap_components.themes import BOOTSTRAP
from src.components.layout import create_layout
from src.data.loader_gz import load_spc_data
from json import load
import os
from dotenv import load_dotenv
load_dotenv()
config_file = "./config.json"
with open(config_file) as config_f:
config=load(config_f)
def main() -> None:
print(os.getenv("MY_ENV_VAR"))
# load the data and create the data manager
data = load_transaction_data(config["DATA_PATH"])
app = Dash(external_stylesheets=[BOOTSTRAP])
app.title = "Reliability Dashboard"
app.layout = create_layout(app, data)
app.run()
if __name__ == "__main__":
main()