moved rest api instantiation into separate file

This commit is contained in:
2022-05-19 23:17:16 +02:00
parent 3d929ad54c
commit 8c58bf0198
3 changed files with 44 additions and 40 deletions

View File

@ -3,17 +3,17 @@ from st_aggrid import AgGrid
import hacks
from restapi import api
from restapi import restapi
from utils.st_utils import get_session_id, rerun
st.set_page_config(layout="wide")
api.sid = get_session_id() # rest api needs current session ID to trigger the next rerun
restapi.sid = get_session_id() # rest api needs current session ID to trigger the next rerun
changed = api.changed
df = api.data
changed = restapi.changed
df = restapi.data
@ -38,7 +38,7 @@ response = AgGrid(
new_df = response.get("data")#, df)
if not new_df.equals(df) and not changed:
api.data = new_df
restapi.data = new_df
# print("old:")
# print(df)
# print("new:")