🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Dash for Single Page Apps

Hey guys,

This if probably fairly related to the question on multi page apps, but I would love to get some thoughts on where dash is heading - like is the end game here heading toward a framework to build substantial single page apps? I currently do alot or proto typing in Jupyter notebooks which is just great for data stuff, and love plotly as its so polished, but when it comes to then needing to build out web, I will tend to switch over to a django/angular/D3 thing. We tend to end up doing alot of custom d3 stuff and also we do alot of web audio stuff - but it would be so nice to be able to stay in python for everything.

After spending some time with Dash, I have to say its seems to be a bit of a game changer for the stuff we do (in fact, its been amazing to play around with! I keep on expecting to find things I don’t like but can’t get over how cool this is to work with), but I am really interested to see where its going - like if you need to build out auth services in the context of a dash app, how would that work? I probably should take a better look at the code to see how its integrated with flask and react, but I am really interested in getting a sense of where this heading, so thought it might be an idea to post to the forum.

Jamie

2 Likes

I am also wondering about this. The intro announcement said, “For advanced developers, Dash apps can be extended through the rich set of Flask Plugins as well.”

But, it is unclear how a Flask plugin would work within the Dash paradigm. @chriddyp - could you clear this up?

It would be nice to just “from flask_oauth import OAuth” and go to town, or install flask-user and have that functionality.

In particular, I would really like to see how we could put certain “pages” as behind user login and some not…
But, since the “pages” are really just different values in the children property of some container element, and there is not even a page reload involved…

I wonder, Chris, how we can implement something as simple as the below:

app.py

from Flask import render_template
from flask.ext.login import login_required, current_user

app.route(’/’)
def index():
return render_template(“index.html”)

app.route(’/dashboard’)
login_required
def account():
return render_template(“account.html”)

2 Likes

I tried same thing with flask but unable to plugged the apps with dash