From 22aa098a945630b7d65039b4e3f5f2244f08097b Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Mon, 23 May 2022 13:24:57 +0200 Subject: [PATCH] cleanup --- stand.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/stand.py b/stand.py index b4ea169..bb1e377 100644 --- a/stand.py +++ b/stand.py @@ -5,9 +5,11 @@ import hacks from aggrid import aggrid from download import download from restapi import restapi -from utils.st_utils import get_session_id, rerun, hide_UI_elements +from utils.st_utils import get_session_id, hide_UI_elements +print(">>> start of streamlit run") + st.set_page_config( page_title="stand", @@ -18,17 +20,12 @@ st.set_page_config( hide_UI_elements() - restapi.sid = get_session_id() # rest api needs current session ID to trigger the next rerun changed = restapi.changed df = restapi.data - -print(">>> start of streamlit run") - - download(df) @@ -41,20 +38,10 @@ response = aggrid( new_df = response["data"] if not new_df.equals(df) and not changed: restapi.data = new_df -# print("old:") -# print(df) -# print("new:") -# print(new_df) -# print(">>> force rerun") -# rerun() -#st.dataframe(df.astype(str)) -#st.dataframe(new_df.astype(str)) if not new_df.empty: -# new_df.to_excel("output.xlsx") - new_df.to_hdf("output.h5", key="stand") - + new_df.to_hdf("stand.h5", key="data") print(">>> end of streamlit run")