Merge pull request 'feat/auth' (#6) from feat/auth into main
Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import json
|
||||
import os
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
import dash_auth
|
||||
import pandas as pd
|
||||
from app_styles import header_style
|
||||
from dash import (
|
||||
@@ -22,6 +24,10 @@ from sql_utils import execute_query, test_db_connection
|
||||
external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]
|
||||
|
||||
app = Dash(__name__, external_stylesheets=external_stylesheets)
|
||||
auth = dash_auth.BasicAuth(
|
||||
app,
|
||||
{os.getenv("APP_UNAME"): os.getenv("APP_PW")},
|
||||
)
|
||||
app.index_string = header_style
|
||||
|
||||
notification_md = """
|
||||
|
||||
21
poetry.lock
generated
21
poetry.lock
generated
@@ -294,6 +294,25 @@ dev = ["PyYAML (>=5.4.1)", "coloredlogs (>=15.0.1)", "fire (>=0.4.0)"]
|
||||
diskcache = ["diskcache (>=5.2.1)", "multiprocess (>=0.70.12)", "psutil (>=5.8.0)"]
|
||||
testing = ["beautifulsoup4 (>=4.8.2)", "cryptography", "dash-testing-stub (>=0.0.2)", "lxml (>=4.6.2)", "multiprocess (>=0.70.12)", "percy (>=2.0.2)", "psutil (>=5.8.0)", "pytest (>=6.0.2)", "requests[security] (>=2.21.0)", "selenium (>=3.141.0,<=4.2.0)", "waitress (>=1.4.4)"]
|
||||
|
||||
[[package]]
|
||||
name = "dash-auth"
|
||||
version = "2.3.0"
|
||||
description = "Dash Authorization Package."
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "dash_auth-2.3.0-py3-none-any.whl", hash = "sha256:2fa72d4ee128b4f9cf0c958157a986ffcd0b93d43b54d64e3cef5976ab7e0abe"},
|
||||
{file = "dash_auth-2.3.0.tar.gz", hash = "sha256:72df43248c15e121f8d5d710981e880deb2df546b564f2951a10ca50d7d92f6d"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
dash = ">=1.1.1"
|
||||
flask = "*"
|
||||
werkzeug = "*"
|
||||
|
||||
[package.extras]
|
||||
oidc = ["authlib"]
|
||||
|
||||
[[package]]
|
||||
name = "dash-core-components"
|
||||
version = "2.0.0"
|
||||
@@ -2143,4 +2162,4 @@ type = ["pytest-mypy"]
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "a6af9cf3858b3e05a3ac81716c79d6a3ed8e797da13391b2fc3e8c383741d00b"
|
||||
content-hash = "ba2dd726c43c7c463de4924ac99d989972a002033106b6918824eaee0100bb03"
|
||||
|
||||
@@ -35,6 +35,7 @@ gunicorn = "^23.0.0"
|
||||
pyodbc = "^5.1.0"
|
||||
pandas = "^2.2.2"
|
||||
openai = "^1.43.0"
|
||||
dash-auth = "^2.3.0"
|
||||
|
||||
[tool.poetry.group.docs.dependencies]
|
||||
mkdocs = "^1.6.0"
|
||||
|
||||
Reference in New Issue
Block a user