assign flask server to dash app

vishal
Level 2
assign flask server to dash app

Locally we use

 

server = Flask(__name__)
app = dash.Dash(__name__, server)



Is there a way to assign flask server to dash app?

0 Kudos
4 Replies
fchataigner2
Dataiker

Hi,

when you run a Dash webapp in DSS,  DSS actually creates the Flask server and assigns it to the Dash app, exactly like you're doing. This means that as a DSS user you won't have access to the Flask server creation. What Flask options do you need to control?

vishal
Level 2
Author

I am trying to init SQLAlchemy,
and login manager from flask_login.

can I directly use server the way I can use app without instiating it?

0 Kudos
vishal
Level 2
Author

I found it.
All this while I was creating a flask instance like:

server = Flask(__name__)

all I had to do was use it from app ie.,

server = app.server.

Thanks @fchataigner2 , your explanation helped!

CoreyS
Dataiker Alumni

Weโ€™re glad you were able to figure it out @vishal!

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as โ€˜Accepted Solutionโ€™ to help others like you!