Add endpoint that only returns the total number

This commit is contained in:
Felix Blanke
2023-09-19 19:46:38 +02:00
parent 4f1835c8f8
commit 29459d5386
+8
View File
@@ -431,5 +431,13 @@ def dashboard():
) )
@app.route("/total")
@cache.cached(timeout=60)
def total_result(url: str = "https://beschaeftigtenbefragung.verdi.de/"):
df, df_state, curr_datetime = get_tables(url)
total = df_state["Digitale Befragung"].sum().item()
return f"{total}"
if __name__ == "__main__": if __name__ == "__main__":
app.run() app.run()