Add flask-compress (#409)

Added flask compression for compressed responsed to limit the download
time of plots.
I switch this on by default. It could also be crontoled via
DASH_COMPRESS as an env variable.
This commit is contained in:
Philipp Horstenkamp 2023-11-20 21:12:07 +01:00 committed by GitHub
parent 36f2d653b1
commit 762d3f9091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 637 additions and 488 deletions

1123
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,7 @@ dash_cytoscape = "^0.3.0"
dashvis = "^0.1.3"
datetime = "^5.3"
deutschland = {git = "https://github.com/TrisNol/deutschland.git", branch = "hotfix/python-3.11-support"}
flask-compress = "^1.14"
frozendict = "^2.3.8"
html5lib = "^1.1"
loguru = "^0.7.0"

View File

@ -27,6 +27,7 @@ app = Dash(
suppress_callback_exceptions=True,
external_stylesheets=[dbc.icons.BOOTSTRAP],
title="Transparenzregister",
compress=True,
) # use dbc for icons
app._favicon = "favicon.png" # noqa: SLF001
add_auth(app)