Is there a *pretty* way to stop/quit script until parameters have been set?

At the moment Iā€™d say your approach is a good way to do it, because thereā€™s presently no directly implemented sense of ā€œcollect all of these things before you run somethingā€ built into Streamlit.

In discussion within engineering at Streamlit has been the concept of a State object which would keep track of whatever inputs youā€™d like to keep stateful in between runs.

One solution others have used is the SessionState workaround. A streamlit user also created an alternative implementation of session state here.

The idea would be to use stateful collectors so that you gate the running of the expensive function calls with the contents of the session state.

Regardless, it would help us out if you could comment on this issue regarding client-side statefulness! Streamlit development is being actively shaped by our user base. We want Streamlit to be as useful and beautiful as possible.

Thanks for your question!

1 Like