Streamlit: Turn a Python script into an interactive data analysis tool
41–50 of 67 posts
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#42Wow it’s great to see the Pythonians finally realizing they need a Rshiny for python.. /s
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#43This looks really slick, can't wait to try it out! If anyone is curious about other tools in the same space, our data scientists use Dash[1] and plotly to build interactive exploration and visualization apps. We set up a Git repo that deploys their apps internally with every merge to master, so they're actually building and updating tools that our operations, marketing, etc teams use every day. [1] https://plot.ly/da…
I've always looked on Dash as a bit of FOMO myself. If you have experience with Jupyter, could you contrast Dash vs Jupyter?
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#44This looks excellent. I'm an avid RShiny user and can't wait to try this and Dash. Is there an example for how to host (e.g. on aws or google cloud) and make an app available online?
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#45Re: Streamlit: Turn a Python script into an interactive data analysis tool
#46Apart from ML, this could be very useful for creating dashboards in the healthcare setting. Dashboards are surprisingly had to make, deploy, and maintain in the hospital. I've created many one-off webapps for different research groups and have been dreaming of a tool that consolidates all the front end work allowing me to concentrate how to process the data. Streamlit looks incredible for this!
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#47"Streamlit assigns each variable an up-to-date value given widget states."
This line is interesting because it implies distributed state in each component (widget). Alternatively this could be framed in centralized state manager terminology.
"Each widget is provided with the current state of the application, and that state is also available to your script."
If you adopt this mindset you can separate the concerns of state and presentation. At first glance it appears that you need to extract state from widgets at the same point as they are added to the page.
(Please correct me if I'm wrong.)
I might not want to have a widget added to a page until much later in the script, but I want to have access to its state at the top of the script.
The value of the top level `props` parameter to a react component is it gives you access to all state wherever you need it, and disentangles this state from the arrangement of the page.
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#48Can this be used from within the Jupyter notebook?
Not at the moment. There are a few reasons for this, but perhaps the most fundamental one is that Streamlit starts a blocking server -- so even if you could run it inside Jupyter it would pause your Jupyter session until you killed Streamlit. (Co-founder of Streamlit here)
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#49This is a declarative programming model similar to React. I'm surprised the analogy isn't drawn in the article. "Streamlit assigns each variable an up-to-date value given widget states." This line is interesting because it implies distributed state in each component (widget). Alternatively this could be framed in centralized state manager terminology. "Each widget is provided with the current state of the application…
Ian:
Thanks for that comment. You're exactly right: Streamlit adapts a React-like model. In fact, the connection goes deeper than the post describes. For example, to make it efficient to run the same script repeatedly, Streamlit does packet-level deduplication. If you generate a lot of data and send it to the browser, only small deltas need be sent to update the UI.
We have a list of future blog posts we hope to write and one of them is (cheekily) called "Streamlit is React for Python." ;) (Not quite true, more of an imperfect analogy!)
So it made me really happy to see someone drawing that analogy already. Thank you. :)
Re: Streamlit: Turn a Python script into an interactive data analysis tool
#50I saw there is a Streamlit for teams in the future (sounds expensive) and on the forums they recommended to make a docker container and host it anywhere, which is doable, but I'd love a way to be able to just put something up on the internet for a short period of time, sort of how now.sh[1] works.
[1]: https://zeit.co/home