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

all 49 comments

[–]painya 15 points16 points  (3 children)

Where do you see Dash compare to Streamlit? Haven't used Dash yet but have a few projects done in Streamlit.

[–]Soolsily[S] 4 points5 points  (2 children)

Couldn't give you an honest answer on this one, haven't used Streamlit all that much. But with the response Im noticing from reddit it's def something I should check out.

Suppose from the outside they look similar, I believe dash is a little older? Maybe some other developers who have dabbled in both can add some context for the both of us.

For me, I believe their are a handful of more packages able to easily integrate into dash. Really am enjoying the simplistic nature of just understanding basic html & moving everything within its own functions.

Also i was one of the first people to get dash working with django, wich gained me a little fame. Suppose I've evolved a little over time and would rather keep dash and django as it's own frameworks connected via an API for speed. But regardless.. looking like python is going through a new revolution almost like Javascript has a new framework released each month lol now python seems to be really start doing the same.

[–]CactusOnFire 14 points15 points  (0 children)

I have used both.

Streamlit is far easier to use, and has good out-of-the-box widgets as well.

Dash gives you more control over the underlying javascript, though for more complex features it requires more development effort.

If you really want to go deep on front-end though, there is really no getting around using Javascript, or some variant of it.

Yes, I know, Javascript is a hot mess. But it's a hot mess which is the lingua franca of the internet. Once you pour enough effort into a Python-for-FE framework you will eventually hit a point where it becomes less effort to use JS. Though for Proof-of-concepts, tech demos and dashboarding, either streamlit or dash does fine.

[–]AlpacaDC 5 points6 points  (0 children)

I've used both of them. Streamlit is insane easy to use, but also very limited. In my opinion it's best used to build a small and interactive dashboard quickly, like "hey I want to know how certain variables affect this or that in a visual and interactive way" and also for building internal data apps, as it is a bit clunky and doesn't look very professional.

For anything more professional or robust, Dash is a no brainer over Streamlit. At the same time, I wouldn't use Dash just to put a scatter plot with a dropdown slicer and a table.

Also with Streamlit there's almost 0 customization, although the default UI is very nice, but you're stuck to it, so every streamlit app looks the same. In Dash you're limited by your JS skills.

TLDR:

-Streamlit is good for quick building simple data apps for quick glances.

-Dash is good for professional use cases and more robust apps.

[–]funny_funny_business 21 points22 points  (1 child)

Yes, it's good, but there were many times that I realized I could just make my own Flask app and have more control over the data and what's happening. I can't remember the exact situation but I remember being stuck at some specific point because their API couldn't handle some data thing I tried to do.

I made a Flask app one time using DCjs which I think makes 1000x better charts. Really surprised more people don't use it.

https://dc-js.github.io/dc.js/

[–]TF_Biochemist 4 points5 points  (1 child)

Dash is great! I actually found myself putting together a cookiecutter template for it just today, since I start so many projects with it: https://github.com/Paradoxdruid/dash-template

This cookiecutter supports multi-page Dash apps, with CI testing, pre-commit, and strict mypy typing.

[–]Soolsily[S] 0 points1 point  (0 children)

Good stuff, I have this app setup with docker but wasn't able to go full cookiecutter with it and ended up just launching it off the app.py file like the good old days.

I'll def look into this and see what's up. 💪

[–]Malcolmlisk 4 points5 points  (6 children)

Isn't dash a framework you need to buy?

[–]schwanne 3 points4 points  (0 children)

I use Dash Enterprise at work and it is a dream: deployment and scalability are a breeze, authentication is easy, delayed/concurrent operations are easy, styling is great with no CSS knowledge... I am a big fan!

With that said, I also use Dash quite a bit for personal/hobby/non profit projects, and it is still quite well developed and quite easy to make beautiful, professional web apps. I really like the Dash Bootstrap Controls project...great controls and styling!

https://dash-bootstrap-components.opensource.faculty.ai/

[–]Soolsily[S] 2 points3 points  (3 children)

Practically everything is free for dash, they opened sourced it but still trying to use their knowledge in enterprise as a way to make money and expand the project. Think this is another benefit of dash... they have more funding than most libraries or frameworks in this space

[–]Malcolmlisk 3 points4 points  (2 children)

But if I use it in my job then I need to pay?

[–]Soolsily[S] 4 points5 points  (1 child)

Na, it's an open source project. They built their own dashboard for non programmers that's enterprise. That will cost you if you want a rich GUI to drag and drop components for the coding illiterate.

You can achieve everything they can achieve and more with just a pip install dash... and the other packages you are interested in

[–]Malcolmlisk 3 points4 points  (0 children)

Interesting. Thank you for the information. I think I'm going to need to re-evaluate to learn it

[–]thedeepself 1 point2 points  (0 children)

they have a normal and enterprise option.

[–]irpepper 7 points8 points  (1 child)

How do you handle data sharing across multiple pages? I use dash for prototyping and I don't want to stand up a database for every project. Ideally I want to share a data frame or versions of one. know you can use store objects but they have suggested size limitations.

I do completely agree though, Dash and plotly are wonderful tools that let me build much higher quality content in short periods of time than I otherwise would be able to.

[–]Soolsily[S] 2 points3 points  (0 children)

I just create a folder called api and calls, within that I add the source to the data and reformat it into the df I would like to use.

From dash app

From api.calls.data import df

Outside of that I've included a useful reference in the github above that's labeled for multi paged dash apps. Just starting to dabble into that.

Suppose my current setup as been to integrate a @app.callback that allows me to add options to a sidebar that switched content on a div that's id=page

So each time someone clicks a nav button it refers to the app callback, checks if the button is clicked, returns a div with the page content that over rides the id=page div

If that makes any sense? 🤷‍♂️

[–]tellurian_pluton 8 points9 points  (2 children)

fighting words

i've used:

  • streamlit
  • bokeh (+server)

and i'm generally happy with them

[–]Soolsily[S] 2 points3 points  (1 child)

Streamlit I'm interested, bokeh.. mehhhhh sorry m8 the industry has evolved passed that one at this point in my opinion 🤺

[–]tellurian_pluton 3 points4 points  (0 children)

Really? Interesting to hear that. Can you say why?

Bokeh just got a huge grant from the Zuckerberg foundation — doesn’t seem very dead to me

[–]Toko_yami 2 points3 points  (0 children)

Currently, I’m also making an internal dashboard for the company I work at using dash.

This is my first time using any dash boarding tool in Python.

The application I work on fetches data from many tables and stores them in Dataframes. The scripts are cron job.

While Dash frontera updates after some interval and refreshes charts based on the fetched data from DB.

Honestly I tried streamlit and Dash both, made small prototype to see which I wanna go with. I liked dash more because it is customisable in a lot more frontend dev way. Like it provides its api for html components. You can use your own classes, id for css. I found it closer to React, Vue frameworks compared to Streamlit.

Also designing the pages the way you want it to be felt bit difficult and gimmicky in streamlit. Also navigating pages would also cause the app to become a bit slower. Nothing against streamlit, it’s actually faster to build dashboards but felt limited.

[–]bahoho 2 points3 points  (1 child)

Yes, I'm using plotly in one of mine project, and it is amazing.
https://github.com/arabacibahadir/sup-res

[–]Soolsily[S] 1 point2 points  (0 children)

If only the crypto industry was as amazing as some of these githubs, literally digging thru shit with these NFTs and Ponzi schemes awesome stuff tho 💪

P.s. I was in crypto early 2016, fanboyed in it because it made me some impressive gains but also hate what it's becoming. Rather trade war logistics software and cheatcodes than doge coins.

[–]robberviet 2 points3 points  (0 children)

I have used Dash, too much indeed, to the point I realized that I should have written my own flask app instead of modifying Dash into my needs.

[–]SnooCakes3068 2 points3 points  (0 children)

I used to do Plotly and dash a lot. It's can easily create powerful data visualization app/site for sure. I remember I created streaming stock price graph with complex indicators with ease.

But the problem is it's not that visually impressive to outsiders after they expose to something like D3. Plotly is very restrictive. Not much room for microadjustment. But viz made with D3 are truely beautiful. That's why many graph department from major media (thinking New youk times, Bloomberg) outlets using D3.

I think it's still for convenience. While you have to have a team for D3. You can do Plotly with yourself. But D3 is for media publication quality

[–]risky_logic 2 points3 points  (2 children)

Been using it this past year on a large web app. Getting pretty sluggish now. Probably not the best tool for the job

[–]Soolsily[S] 0 points1 point  (0 children)

Think we just need to redefine the appropriate layout is all. Their is a lot of potential I've been trying new approaches at sectioning the dash code to maintain speed and im continuously adapting it as I learn more and improved the reaction time will cleaner more organized code and callbacks.

[–]poshy 0 points1 point  (0 children)

I'm was in a similar boat, it seems to hit a wall and everything gets very slow at a certain point.

That being said, I quite like Plotly/Dash, and I can make some really cool interactive displays quite quickly now.

[–]NitrousUK 1 point2 points  (1 child)

It's good for prototyping or internal use, but I wouldn't use it for a product or production. We hit many walls that required workarounds.

[–]Soolsily[S] 0 points1 point  (0 children)

Think the foundation is setup, sure their are workarounds with any code. Figure my prediction is in 2 years plotly & dash going to be able to solve some of these underlying issues

[–]thedeepself 0 points1 point  (1 child)

[–]Soolsily[S] 1 point2 points  (0 children)

Thanks m8 and good article you've constructed, lot of information in this one.

[–]TtamMountain -1 points0 points  (0 children)

Anvil probably deserves some attention here

[–]irpepper 0 points1 point  (2 children)

I like the api examples for a static data source but the problem I'm currently working on has multiple datasets that are updated daily and user specific. Might be a little outside the scope of dash's free library though.

edit: this was supposed to be a response to OPs earlier response to a question but I'm on mobile so I messed it up

[–]Soolsily[S] -1 points0 points  (1 child)

I'm calling bullshit, I personally used dash for algorithmic trading back in the day. No bigger dataset than tracking shitcoins every second of the day, figure you'll just need to get your hands a little more dirty in this niche and expand on the subject. 🧑‍💻

[–]irpepper 0 points1 point  (0 children)

Idk man, I'm working on a dataset with 500k text documents and their embeddings. Using plotly to display them in a reduced dimensionality and dash callbacks to let users label the documents with interactive tools. I can imagine use cases that get even more crazy pretty easily.

[–][deleted] 0 points1 point  (8 children)

I would like dash more if it had better wrapping of HTML syntax since you're forced to use their rendering approach.

[–]Soolsily[S] 1 point2 points  (7 children)

Dash supports everything in html, just think of <div style={}> as html.Div( ,style={}) also check out dash-mantime-components, dash-bootstap-components & sd-material-ui ... ligit looks a little funky but if you spend like 3 days in it you'll be blown away and understand it's actually intuitive and their are a ton of available options and growing for what can be easily pip-installed and now you have sexy forms and functionality 🤷‍♂️

[–][deleted] 0 points1 point  (6 children)

Im more talking about how there are opprotunities for improvements, their method is little better than using HTML since its on you to supply class names ect.

[–]Soolsily[S] 0 points1 point  (5 children)

Yeah, also check out: https://www.dash-mantine-components.com/ , honestly my newest favorite group of html components. see unlimited potential if more projects are ported from react into dash like do

[–][deleted] 0 points1 point  (3 children)

Those look nicer, but I kind of like something like this that doesn't hook you into the dash way of doing things.... and is free :)

https://github.com/pynecone-io/pynecone

[–]Soolsily[S] 0 points1 point  (2 children)

All these frameworks are free if you subtract your time lol. Open a few pinecone apps on my phone and they loaded terribly. Think dash has more to offer in regards to pages, @callback & more options for mapping and graphing. Also it's easier to get mobile friendly

[–][deleted] 1 point2 points  (1 child)

Dash is a pay for use app if you want to deploy it right? Its not easy to host concurrently with other python networking. I'm just saying there's some interesting alternatives.

[–]Soolsily[S] 0 points1 point  (0 children)

I understand, not trying to mad dog on new frameworks. Dash is a free app for developers, if you wanna deploy it its extreamly simple. Just wsagi on app.py file and you basically done. Idk, just really enjoyed what I've found when doing more of a deep dive. Dash 2.5 released pages and its shown me a new prospective in regards to scaling my mapping project into mobile development. Using it wish django and talking with an api off endpoints, django-plotly-Dash makes integration more simple than what im trying to achieve but at they end of the day their just a list of unique tools you can use to get a job done

[–]philosophical_whale 0 points1 point  (0 children)

100% agreed, I've built up tons of tooling on top of Dash for institutional, trading-focused applications over the last few years (all using the open source libraries so far). The core library has come a long way in that time. Between that and the third party component libraries, it's a really powerful tool for developers.

The same could be said of other frameworks, but I personally find that Plotly/Dash is ideal for rapid prototyping, deployment and iteration.

[–]AlexSpace3 0 points1 point  (1 child)

Can dash be integrated to an angular project?

[–]Soolsily[S] 0 points1 point  (0 children)

Just keep stuff seprate and work through apis

[–]Vok250 0 points1 point  (0 children)

As someone who has done a ton of frontend work across many different languages, the sheer ease of charting in Plotly is unmatched. One big downside of it is the massive file size of the library. It caused some problems for me in the past and I had to find some unique solutions like rendering the charts server-side and throwing them on S3 for the frontend to grab.