From 15fb6c7434e3ed65573a60af88baae2e234d3c53 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sat, 28 May 2022 12:10:33 +0200 Subject: [PATCH] restructure --- run.sh | 2 +- stand/restapi.py | 2 +- stand/tblctrl.py | 4 ++-- stand.py => stand/webapp.py | 10 +++++----- stand/widgets/download.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename stand.py => stand/webapp.py (81%) diff --git a/run.sh b/run.sh index 8520f87..2b6bf4f 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/bash -streamlit run --browser.gatherUsageStats false $@ stand.py +streamlit run --browser.gatherUsageStats false $@ stand/webapp.py diff --git a/stand/restapi.py b/stand/restapi.py index 579cc2c..e32ee8d 100644 --- a/stand/restapi.py +++ b/stand/restapi.py @@ -2,7 +2,7 @@ from threading import Thread import cherrypy as cp -from stand.tblctrl import TableController +from tblctrl import TableController # creating instances here allows to use TableAPI etc. as singletons diff --git a/stand/tblctrl.py b/stand/tblctrl.py index 6c74fd5..5c956f8 100644 --- a/stand/tblctrl.py +++ b/stand/tblctrl.py @@ -1,7 +1,7 @@ import cherrypy as cp -from stand.utils.dfh import DateFrameHolder -from stand.utils.st_utils import rerun +from utils.dfh import DateFrameHolder +from utils.st_utils import rerun @cp.expose diff --git a/stand.py b/stand/webapp.py similarity index 81% rename from stand.py rename to stand/webapp.py index f5f5da7..fc138f5 100644 --- a/stand.py +++ b/stand/webapp.py @@ -1,11 +1,11 @@ import streamlit as st -import stand.hacks +import hacks -from stand.widgets.aggrid import aggrid -from stand.widgets.download import download -from stand.restapi import restapi -from stand.utils.st_utils import get_session_id, hide_UI_elements +from widgets.aggrid import aggrid +from widgets.download import download +from restapi import restapi +from utils.st_utils import get_session_id, hide_UI_elements print(">>> start of streamlit run") diff --git a/stand/widgets/download.py b/stand/widgets/download.py index bbdf984..a28f86d 100644 --- a/stand/widgets/download.py +++ b/stand/widgets/download.py @@ -1,6 +1,6 @@ import streamlit as st -from ..utils.df2bin import to_excel_binary, to_hdf_binary +from utils.df2bin import to_excel_binary, to_hdf_binary state = st.session_state