Live data from Hacker News

Streamlit: Turn a Python script into an interactive data analysis tool

towardsdatascience.com

21–30 of 67 posts

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#22

This is spectacular. I have written about this many times on HN itself . Jupyter -> internal tool/API is pretty much the holy grail of bridging data scientists, business teams and engineering. I hope this project doesn't die out. A lot of people would pay for this.

They have plenty of funding, so if it solves a real problem for people, I expect they are here to stay.

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#24
post #15

This is cool but it's already been on the top page twice this week... https://news.ycombinator.com/item?id=21127528 https://news.ycombinator.com/item?id=21126477

Maybe redundant, but I'm glad it was posted again because I didn't see it those other times.

Likewise, and the timing couldn't be better for me. This is a very exciting discovery.

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#25
post #5

This looks super interesting. I relate to the motivation of building something like this- the endless cycle of creating a Jupyter notebook which becomes a Flask app. I really liked the quick feedback loop for the visual components and the fact that it is all in Python. I haven't checked yet but a question that comes to mind is how extensible is this framework. I can easily see how I'd want to make custom widgets.

Hi J0e1, I'm one of the founders of Streamlit.

Regarding extensibility, we totally agree: over time, many people are going to want to write their own custom widgets. Which is why we're actually in the early phases of designing a plugin system for Streamlit.

So stay tuned!

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#26

Can 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

#27
post #3

can this be used for building web apps at production scale?

Hi bobosha

It depends on how you would define "production scale".

If you're talking about hosting a publicly accessible Streamlit app on the internet, it's definitely possible but will require you to set up an appropriate infrastructure around it: sticky load balancer, replication, orchestration, etc.

If you're talking about hosting something for internal use by your company, very often just a simple machine serving your Streamlit app is more than enough.

That said, we're currently working on Streamlit For Teams, which is a paid offering that will make it trivial to deploy Streamlit apps for these use cases. If you're interested, you can sign up here: https://streamlit.io/forteams/

(Co-founder of Streamlit here)

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#28
Cool!

requests_cache caches HTML requests into one SQLite database. [1] pandas-datareader can cache external data requests with requests-cache. [2]

dask.cache can do opportunistic caching (of 2GB of data). [3]

How does streamlit compare to jupyter voila dashboards (with widgets and callbacks)? They just launched a new separate github org for the project. [4] There's a gallery of voila dashboard examples. [5]

> Voila serves live Jupyter notebooks including Jupyter interactive widgets.

> Unlike the usual HTML-converted notebooks, each user connecting to the Voila tornado application gets a dedicated Jupyter kernel which can execute the callbacks to changes in Jupyter interactive widgets.

> - By default, voila disallows execute requests from the front-end, preventing execution of arbitrary code.

[1] https://github.com/reclosedev/requests-cache

[2] https://pandas-datareader.readthedocs.io/en/latest/cache.htm...

[3] https://docs.dask.org/en/latest/caching.html

[4] https://github.com/voila-dashboards/voila

[5] https://blog.jupyter.org/a-gallery-of-voil%C3%A0-examples-a2...

Acess control and resource exhaustion are challenges with building any {Flask, framework_x,} app [from Jupyter notebooks]. First it's "HTTP Digest authentication should be enough for now"; then it's "let's use SSO and LDAP" (and review every release); then it's "why is it so sloww?". JupyterHub has authentication backends, spawners, and per-user-container/vm resource limits.

> Each user on your JupyterHub gets a slice of memory and CPU to use. There are two ways to specify how much users get to use: resource guarantees and resource limits. [6]

[6] https://zero-to-jupyterhub.readthedocs.io/en/latest/user-res...

Some notes re: voila and JupyterHub:

> The reason for having a single instance running voila only is to allow non JupyterHub users to have access to the dashboards. So without going through the Hub auth flow.

> What are the requirements in your case? Voila can be installed in the single user Docker image, so that each user can also use it on their own server (as a server extension for example). [7]

[7] https://github.com/voila-dashboards/voila/issues/112

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#29
Interesting project, but why does an open source developer tool needs browser telemetry?

You should ask for telemetry permissions _before_ the process starts up (as you do for email address), and keep the default as "No", instead of start to send the data transparently unless non user friendly steps are taken by the user.

Re: Streamlit: Turn a Python script into an interactive data analysis tool

#30
post #14

This 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…

Dash is awesome. I've been using Shiny in R for similar purpose. Do you have any blog post or some more details around the deployment process and your use-case of using Dash?
Post reply on HN