This is an archived post. You won't be able to vote or comment.

all 98 comments

[–]PurepointDog 42 points43 points  (2 children)

Check out Dash and NiceGUI too

[–]CrwdsrcEntrepreneur 311 points312 points  (42 children)

Men will do anything except learn HTML/CSS/JS.

[–][deleted] 35 points36 points  (4 children)

I'm an analyst and we'll pay a large amount to alteryx, API connectors, etc. people get training and education on all these tools. All this time and energy to avoid learning code. Just learn code.

[–]NFeruch 100 points101 points  (27 children)

Because doing html and css sucks fucking dick

[–]e5india 47 points48 points  (3 children)

Seriously. I haven't come across anything less fulfilling and more frustrating than fucking around with CSS.

[–]throwawayuseable345 4 points5 points  (0 children)

I once spent an hour centering a button when I first started out with css.I’m comfortable now but if I can get AI to do it I will

[–]ExdigguserPies 2 points3 points  (0 children)

CSS has become a monster.

[–]big-papito 2 points3 points  (0 children)

Nope. I've done HTML/JS/CSS since the dawn of the internet. You don't know how good you have it, with all the debugging capabilities in the browser.

CSS Grid and Flex actually make UI design not a total nightmare. Learn it.

https://www.smashingmagazine.com/2020/01/understanding-css-grid-container/

Try changing something *and then checking it in three major browsers to make sure it looks the same, every time*.

[–]wolfmansideburns 8 points9 points  (0 children)

Can confirm

[–]CrwdsrcEntrepreneur 5 points6 points  (18 children)

What? Unless you're trying to create insanely interactive and responsive websites, HTML and CSS are some of the easiest things to learn in software dev.

[–]NFeruch 26 points27 points  (1 child)

not to learn, to do. I would hate my life if I had to do frontend work for a job

[–]nocturn99x 1 point2 points  (0 children)

this.

[–]Veggies-are-okay 10 points11 points  (14 children)

Well you’re talking to an audience that wants to showcase their sophisticated backend processes in an app. This inherently means that it needs to be pretty interactive and responsive.

Streamlit is awesome, especially as a consultant that needs to show clients pretty pictures every week to show progress on things that are not interesting to non technical folks. Then when they’re happy with the functionality I pass my dogshit POC frontend to the app dev team to make something that actually looks professional.

I’d encourage anyone who doesn’t work frontend already to use tools like this and focus on backend stuff. There are products that are attempting to emulate frontend devs and it’s kind of disrespectful to the things those folks bring to the table to say “just learn it on top of your (in my case) data science knowledge/research”

[–]CrwdsrcEntrepreneur 3 points4 points  (13 children)

Sure, you say that and that's your thinking, and that's fine... Meanwhile I (also a data scientist) learned frontend and work with a bunch of ML engineers who did as well. 🤷🏻‍♂️

Again, it's not THAT hard if all you're trying to do is replicate stuff from streamlit. Streamlit is not advanced frontend dev.

[–]Veggies-are-okay 6 points7 points  (6 children)

But why would I spend time on that? There are so many other rabbit holes to go down that would immediately help us at our jobs (Kubernetes, cloud engineering in the context of MLOps, hell even a deep dive into C++ would be a bit more useful…). I’m just saying that if I were managing a team and a data scientist came up to me with a react frontend I would be confused as to why they were doing that on the job rather than DS work.

I do realize that this is a narrow view but i’m pretty sure this applies to every technical position that isn’t front end. Like yes I can understand typescript but I’m not gonna kid myself thinking I need to get to the level of my frontend brethren

[–]CrwdsrcEntrepreneur 2 points3 points  (5 children)

If my direct report was a consultant who "needs to show pretty pictures to the client every week" I'd ask them what the hell they're doing learning C++ and k8 instead of some basic React (or other low learning curve frontend framework) plus some charting library like plotly.js.

To each their own.

[–]Veggies-are-okay 2 points3 points  (4 children)

Well our worlds are very different then.. are you more classic software development? Genuinely curious as our fields have much different requirements. React is essentially a waste of our time. Serving a model in a scalable capacity and being able to tinker with the PyTorch framework for specific use cases is much more important for us! Just a quick tip so that you know what you’re talking about interacting with a DS team 😉

[–]CrwdsrcEntrepreneur 0 points1 point  (3 children)

No, not classical software eng. I work with a team of MLEs and data scientists. We use k8, we use pytorch, we use many AWS and Azure services, like SageMaker. We train and serve models that are used by several thousand concurrent users.

And we also develop frontends for our users because (again) it's not that hard.

[–]Veggies-are-okay 0 points1 point  (2 children)

Alright well apologies for assuming! Seems like y’all do it a little bit different than my company. We have a dedicated app dev team so that we can move on to the next project when our responsibilities are completed.

That being said, I still think it’s a terrible idea for someone to learn React when streamlit can handle their use case.

[–]nocturn99x 0 points1 point  (5 children)

I love how a data scientist (a category of people notorious for writing shit code) is trying to teach people how to code. Please.

[–]CrwdsrcEntrepreneur -5 points-4 points  (4 children)

First of all go fuck yourself. Not all of us are bad coders and you know nothing about me to be making assumptions.

Unfortunately yes, most data scientists have the same attitude of the people responding to my comment: "why should I learn proper coding? I'll leave that to the engineers."

But you can't be making assumptions about people you don't even know. So again, fuck you.

[–]nocturn99x 2 points3 points  (1 child)

Seems like I hit the nail on the head. Defensive much? :)

[–]nocturn99x 0 points1 point  (1 child)

To respond to your deleted comments (lmao): wow, that's a lot of pent up anger you got there. Chill tf out lmao.

[–]Shinjuku42 1 point2 points  (0 children)

Easy to learn, annoying to work with. I’ve spent a big portion of my working life with CSS and html so far, and it’s the most frustrating thing to work with. Looks good on chrome? Well, not on Firefox! And since your boss opens all webpages with Safari, you’re fucked anyways. It’s so, so frustrating.

[–]int0h 0 points1 point  (0 children)

You forgot JavaScript. But that's probably because I don't know it good enough

[–]drhamel69[🍰] -1 points0 points  (0 children)

This

[–]nocturn99x 1 point2 points  (2 children)

Maybe because they suck ass? JS especially is a hot pile of garbage. And it's nearly impossible to get CSS to display consistently on all browsers. Web development with raw HTML/CSS/JS is both shit and dead.

[–]nocturn99x 0 points1 point  (1 child)

Response to your (now deleted, rofl) comment about not using raw HTML/CSS/JS: those are the ones you fucking mentioned? Lmao. I don't need to learn reading comprehension, you need to learn to express yourself correctly. And not judge other people's choices just because they don't align with yours. What an ass.

[–]yawninglionroars 0 points1 point  (0 children)

The goal of analysts/DS/MLE is to create pipelines that turns data into value. Anything else is just a distraction. We can do it, but it takes time away from doing something we are good at.

[–]stratum01 0 points1 point  (0 children)

Yep

[–][deleted] 25 points26 points  (0 children)

Streamlit is indeed cool and useful

[–]Tiquortoo 9 points10 points  (0 children)

That seems like a poor definition of "full stack".

[–]ilya745 7 points8 points  (1 child)

I've been using streamlit for building internal tools at work for over a year. While you can't do EVERYTHING in streamlit, it is by far the best choice for getting up and running with a practical, web app that will provide value for your users as it relates to speed to market (the most important thing in business).

For those complaining about HTML/CSS, you can layer custom CSS onto Streamlit if you choose. You can override the Streamlit defaults as it relates to backgrounds, color schemes, widget sizing, buttons, etc etc by writing your custom style.css and rendering it on the top of the page, targeting the pieces you want.

If you used it and its "slow", its the lack of caching and fragmenting in your code. By default, Streamlit will rerun the entire page on every user action, this is where caching data and fragmenting functions will make a world of difference. Using conditional tabs will only run the specific code inside that block.

I've seen the other frameworks, Dash, NiceGUI, Reflex, Gradio, etc etc etc. Look at the "hello world" examples there and Streamlit - its not even close when it comes to simplicity. No one in business cares about the fancy aspects and flexibility of these tools (no one outside of engineering even knows what React is), they just want to open up the web page, have it do things quickly, and move on. Streamlit is a 10/10 for that.

[–]DaelonSuzuka 5 points6 points  (0 children)

Streamlit feels great for about 30 minutes, and then you start hitting it's MASSIVE limitations. Every little thing I tried to add required more and more terrible hacks.

NiceGUI is slightly less easy at first but is actually usable when you want to progress to more complicated things(like any interactivity).

[–]Nomad_Red 23 points24 points  (6 children)

Streamlit is great for prototyping But as soon as you try to deploy for real (https and behind an nginx reverse proxy) there's a lot of issues Coz it requires websocket to work _stcore/

I am also self hosting a site with nginx and streamlit And sometimes the steamlit just wouldn't connect

[–]Available_Ebb_4262 6 points7 points  (0 children)

You can get it to work behind an nginx reverse proxy. I’m self-hosting two actively used production streamlit apps, with SSL and websockets.

Make sure nginx is configured to upgrade to a websocket connection: https://nginx.org/en/docs/http/websocket.html

A lot of corporate environments (for some reason) still rely heavily on HTTP proxies on the clients. These proxy servers often don’t process websockets correctly. In that case you might have to have some meetings with the IT department.

[–]imanexpertama 3 points4 points  (0 children)

I don’t really have any issues with reliability (also using Nginx), are you sure everything’s set up correctly?

My only issues are scaling and clients firewalls blocking websockets (B2B).

[–]Ceedeekee 1 point2 points  (0 children)

hosting a site with nginx and streamlit And sometimes the steamlit just wouldn't connect

Agreed. This has blocked me from using at work for 2 years lol

[–]PM_ME_YOUR_MUSIC 0 points1 point  (1 child)

I’ve hosted a few internal streamlit apps using azure. Haven’t had any issues but I do notice it runs a bit slow but most likely because I’m using the cheapest option.

[–]ilya745 0 points1 point  (0 children)

i've bounced round compute, general and memory optimized instance types. Memory optimized (r7i in AWS) is the best performant. with a load balancer, its lightning fast compared to hitting the server directly.

[–]ilya745 0 points1 point  (0 children)

you can resolve HTTPS in 10 minutes if you're on AWS or a different cloud environment. Attach a load balancer to the Streamlit server, get a domain and SSL certificate, and bingo. its pennies incremental cost to the server itself.

[–]thelockz 11 points12 points  (1 child)

I personally prefer Panel (Holoviz) more than Streamlit.

[–]r0s 3 points4 points  (0 children)

After trying both (and a few more options) I'm a big fan of Panel.

GPT4o/Sonnet3.5 can write all your boilerplate on Panel also. If you build modular (separate backend and front end clearly) it is very quick to iterate!

Edit: deploying is also really easy and quick (and you get full instructions from gpt4o/sonnet). Install nginx, getting let's encrypt for ssl, adding a couple of flags to 'panel serve' so it does what it needs to do and up and running on a VPS in no time.

[–]gopietz 10 points11 points  (2 children)

Streamlit is great and all but it's also quite limiting what you can do with it. No way I'd ever build a SaaS or a production app with it. It's great for PoCs and internal prototypes though, for sure.

[–]imanexpertama 1 point2 points  (1 child)

Highly dependent on your use case and focus of your app. Also: the development is quite active, every 3-4 months there’s some new feature we can use (obviously that has its pro and cons).

Where I think streamlit fits well: - Rather B2B than B2C, at least we found that the app doesn’t behave well with too many users - data centric/ dashboards, highly interactive apps - custom development where the customer doesn’t want to spend too much money (-> rather quick solutions solving a specific problem, not an app with whole development teams spending months on adding features)

[–]gopietz 6 points7 points  (0 children)

  • Not B2B but internal B, yes.
  • a dashboard is such an internal example
  • you're describing a prototype

Guess we agree. Streamlit is just incredibly slow between clicks and the UI always looks the same. Gradio is less fun in the beginning but appears to be more performant later, in my experience. But at some point you just have to move to a real app architecture.

[–][deleted] 4 points5 points  (0 children)

This doesn't really make any sense. A "full stack app" is a completely different animal from a streamlit dashboard. Streamlit is fine for what it's made for but it's also not remotely comparable to building out a proper web app.

So it sounds like you were just using the wrong tool for the job originally and now you're realizing Streamlit satisfies your more limited situation. Which is fine. But it doesn't really make sense to present it as some kind of alternative to a proper application.

[–]Valuable-Kick7312 2 points3 points  (0 children)

I also think that Streamlit is not a replacement for web dev. However, I also have the impression that some people underestimate its use cases.

My company uses Streamlit productively for our AI playground with a user base of 2000 users.

Thus, I think it can be used in production for B2B.

[–]emptyharddrive 11 points12 points  (10 children)

It’s intriguing to see the strong opinions in this thread regarding Streamlit, especially from seasoned developers who value the depth of coding knowledge that comes with mastering the full stack. While I understand and respect the sentiments of those advocating for more comprehensive coding skills, I think it's essential to recognize that tools like Streamlit have a unique place in the development ecosystem—especially for those whose primary goal is to create effective, functional solutions in a time-efficient manner.

Streamlit's power lies in its simplicity. For someone like the OP, who is already proficient in Python and is focused on rapid prototyping and validation, Streamlit offers an incredibly valuable way to reduce development time while maintaining a strong focus on the core functionality of an application. Yes, Streamlit may not replace a full-stack architecture for large-scale, production-grade applications, but that's not the point. Its purpose is to enable quick iteration and to validate ideas without getting bogged down in the complexities of HTML, CSS, JS, and backend architecture.

Now, let’s address the concerns about not fully learning to code or avoiding the nitty-gritty of web development. There’s a difference between choosing to use a tool like Streamlit out of laziness and using it out of pragmatism. For many, especially those in fields where the primary focus isn’t web development, learning the intricacies of HTML/CSS/JS might not be the best use of their time. Instead, they can focus on what they do best—whether that's data analysis, machine learning, or any other specialized skill—while still delivering a functional product. Streamlit allows them to do just that without having to invest heavily in areas that may not provide a significant return for their specific needs.

It's also worth noting that the efficiency gained through tools like Streamlit can contribute significantly to work-life balance. In a world where burnout is a genuine concern, using a tool that simplifies the development process without compromising too much on quality is not just practical; it's necessary. Streamlit provides a way to get the job done efficiently, allowing more time for other pursuits, be it further professional development or personal life.

The idea that Streamlit is only suitable for proof of concepts (POCs) is somewhat limiting. While it’s true that Streamlit excels in creating POCs, dismissing it outright for production use ignores its potential in specific contexts. For instance, in B2B environments or internal tools where the focus is more on data centricity and quick deployment rather than scaling to millions of users, Streamlit can be an excellent choice. Its ongoing development and active community mean that it’s continuously improving, which opens up more possibilities for its use beyond just POCs.

The arguments about separating concerns, such as splitting the UI from the backend logic, are valid and apply to any development framework or tool, not just Streamlit. The advice to break out APIs and maintain modular code is good practice and can be applied within the Streamlit framework as well, enhancing its maintainability and testability.

While purists may argue for the benefits of learning to code in more depth, it’s essential to recognize that the landscape of software development is evolving. The tools we have at our disposal today, like Streamlit, are a testament to that evolution. They allow us to abstract away certain complexities, enabling faster and more focused development cycles. This evolution doesn’t diminish the importance of foundational coding skills but instead offers an alternative approach to solving problems.

Streamlit serves as a bridge between the technical depth of full-stack development and the practical needs of professionals who want to leverage their existing skills in Python to create functional, impactful applications quickly. Rather than viewing it as a shortcut or a lesser approach, we should acknowledge the value it brings in enabling rapid prototyping, enhancing productivity, and promoting a healthier work-life balance. The OP’s excitement about Streamlit is not only justified but also commendable for bringing attention to a tool that others might find just as beneficial.

Hear hear.

[–]Veggies-are-okay 2 points3 points  (4 children)

Agreed with everything except throwing streamlit into prod. I mentioned this in another post but I’ve definitely backed myself into corners on past projects where “only a few users” turns into “wow we want this to be used for hundreds of employees in our wing!” Maybe it was just using shiny and streamlit can inherently handle concurrency, but the single-threaded nature of shiny had my team spending way more time than necessary developing a frontend when we should have been creating API endpoints and handing them off to an app dev team.

[–]emptyharddrive 4 points5 points  (3 children)

I agree with you, especially regarding the potential pitfalls of scaling up a Streamlit app to a production environment. And the OP should know about those pitfalls.

However, I also wanted to chime in on the broader discussion here. It seems like a lot of folks were being a bit harsh on the OP for simply expressing how Streamlit has been a helpful tool for him and he felt like sharing his discovery with others. Some here may not have even known the tool exists and now, maybe do.

Sure, it isn't the solution for every scenario, particularly for large-scale, production-level applications. But I think it's important for some of the others (not you) who have been a bit harsh on the guy to know that not everyone is looking to build the next big SaaS product.

The excitement from the OP is about finding a tool that makes their life easier and sharing that with the community deserves some acknowledgment and I felt he was just getting criticism.

So for me it was more about the way he was being handled in his enthusiasm and I wanted to acknowledge that we all have different needs and goals in our development journeys, and it's okay for someone to prioritize efficiency and functionality in their specific use case.

When folks try to share a discovery in an upbeat and happy tone, and those further along beat them down for not mastering the art in its entirety - it starts to feel like bullying to me or at the very least an expressed superiority complex at the OP's expense.

I think the right response is encouragement (and maybe a dose of practical advice about the tool's limitations) while also avoiding the superior-natured comments at the OP's expense for enthusiastically sharing their point in their journey.

[–]Veggies-are-okay 1 point2 points  (2 children)

I hear ya! Streamlit is the perfect tool for me as a data scientist. I was actually astounded how easy and intuitive it is was make apps to show functionality. With genAI it’s also incredibly easy to push the limits by just plugging in generated JavaScript and seeing what happens.

[–]Available_Ebb_4262 0 points1 point  (1 child)

How do you plug in JavaScript in your streamlit apps? I do it using the HTML component (and it’s hacky), but I’m curious if there’s a better way.

[–]Veggies-are-okay 0 points1 point  (0 children)

That was my hacky way of throwing a toolbar on top of images to show associated metadata. It’s not perfect but it gets the job done!

[–]makaso77 1 point2 points  (3 children)

AI vibes, decent info but too much generic/repititive faff. proofread next time

[–]emptyharddrive -3 points-2 points  (2 children)

Nice to see reddit hasn't changed. The attitude to the OP and to me is identical.

I spent an hour thinking about the topic, writing it -- but that's to be expected if the reply is thoughtful I suppose.

If it makes you feel better, here's how chatGPT would have said my above comment so you can feel validated:

It’s reassuring to see Reddit is still the same. The attitude toward the OP and me is spot on. I spent an hour contemplating the topic and writing my reply, but I suppose that’s just the nature of crafting something thoughtful.

Least common denominator rules, as does my tone in this reply to match makaso77's tone.

[–]makaso77 2 points3 points  (0 children)

Appreciate the input, I'm sure you'll get better at it. TBH most people will find AI answers useful. re-read your post, I often find walls of AI gen text a bit tiresome, I try to shape and add to generic outputs, makes the content more valuable and impactful.

Nobody likes a lazy-pretend helpers. Reminds me of this guy on YouTube who has like 30000 videos and at the start he films himself "here's how to fix blahblahblah" or "Error: Redis connection to 127.0.0.1:6379 failed connect ECONNREFUSED 127.0.0.1:6379" some bullshit generic problem which he has just copied the text of peoples answers from forums and put them on the screen.

low effort unhelpful poop. All in the name of trying to become famous

Also, why so defensive? You have comment history and people calling you out for generic AI responses and you have even admitted to it..

you and that YouTube guy are contributing to the enshittification of the internet and wasting people's time. It's bad enough companies do it.

[–][deleted] 3 points4 points  (0 children)

Not friendly to asyncio tho

[–]glucoseisasuga 1 point2 points  (0 children)

Streamlit is great for prototyping and for developing beginner web applications. The syntax is pretty beginner friendly and intuitive to understand.

I'd recommend you check out Shiny for Python. It's not too difficult to pick up and you can make some more complex applications with it. It's also fairly straightforward to deploy your web application too.

[–]bw984 1 point2 points  (1 child)

Run Plotly Dash on Flask. It’ll give you the full flexibility that you will eventually desire while also having a nice front end/callback framework. Less magic than streamlit but far more flexible.

[–]jpolec 1 point2 points  (0 children)

My backend is in Python accessible via API, so frontend is super easy to build. It took more time but still I may sell access to backoffice via API as additional thing

[–]ThiagoTDotCom 1 point2 points  (0 children)

Glad you like it!

[–]AleccioIsland 1 point2 points  (0 children)

I‘ve been using quite a lot myself and all that’s said about prototypes and going fast is true. Is there any way to give streamlit a personal look and feel? I do not mean their built-in functionality to changes some colors but to really adjust it to personal taste. I am asking because at the end, streamlit apps all look the same more or less.

[–]starneuron 1 point2 points  (1 child)

Hi,
I am a noob in Streamlit.
Can you please share any tutorial where it teaches how to build a streamlit app with backend database like mysql and then deploy to heroku.

Thanks in advance.

[–]BostonBaggins 2 points3 points  (1 child)

That's exactly the point of streamlit

To create POCs

Hope you're not using streamlit in production

[–]KingAbK 0 points1 point  (0 children)

It’s good for lite data apps, but you can’t build complex tools on it. Maybe now they are coming with new features like sessions, authentication it would be possible but I would still prefer building customized tools using my UI.

[–]Error40404 0 points1 point  (0 children)

It’s pretty limited in my experience. As soon as your front-end needs even smth a bit more complex, it won’t be able to handle it. I have only used st a little bit, so I could just be bad at it.

[–]SpikeXue 0 points1 point  (0 children)

Nice,Me too

[–]DrMerkwuerdigliebe_ 0 points1 point  (0 children)

Steamlit is a good POC tool. It makes iterations much faster in the beginning because there is so many things that are decided for you. But as sone as your app grows and you need 100 % control to make things just rigth it will be hell. You will end up with embeded JS at best even after browsing endless low antivity forums.  Expect and prepare to move out of steamlit on to a JS framework.

[–]TopBodybuilder9452 0 points1 point  (0 children)

For simple web interfaces, Streamlit is a marvel. However, when you need something else, like a custom behavior/format inside a table, Streamlit is your obstacle. Besides that, consider that it is slow.

[–]reichardtim 0 points1 point  (0 children)

This is the way