Is Streamlit actually useful?

Frankly, I feel the same, especially because Iā€™m not a data scientist and because Iā€™m constantly trying to bend streamlitā€™s standard usage to fulfill particular needs.

However, the framework has so much to offer even outside the data science scope and Iā€™m convinced itā€™ll be able to cover more and more use cases as time goes by. That said, Streamlit is already quite useful to me. Just as @andfanilo and @Ian_Calvert said, itā€™s a great replacement (and improvement) for jupyter notebooks and even cli apps to some extent.

Well, the Streamlit way of handling things is just like calling a command line tool with a bunch of parameters.

But as you said, thereā€™s this issue of managing state. The current problem here is when an app reruns, you canā€™t access a widget value prior its declaration/execution. However Iā€™m not sceptical on this matter. One approach Iā€™m working on is to bind a widget to a state variable like so:

print(state.value)
st.text_input("Blabla.", state="value")
state.value = "Hello"  # This assignment updates the widget's value on screen

If you interact with a widget, the whole app will rerun with an up to date state directly from the beginning. Ideally youā€™d even be able to do something like the third line to set/update a widget value (or markdown text) without using st.empty(): a bi-directional binding.

Iā€™m really curious to see if something like this seems simple enough to use and could be a viable solution for state management with widgets.

You encountered the out of sync issue by doing something like this, right?

state.value = st.text_input("Blabla.", value=state.value)

If Iā€™m right about what youā€™re refering to, I guess something like this should help. I know this is your typical ā€œuse this hackā€ answer :joy:, but we have no other solution than using hacks or waiting for an official implementation :stuck_out_tongue: