assign flask server to dash app

vishal
vishal Partner, Dataiku DSS Core Designer, Registered Posts: 7 Partner
edited July 16 in Setup & Configuration

Locally we use

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



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

Tagged:

Answers

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 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
    vishal Partner, Dataiku DSS Core Designer, Registered Posts: 7 Partner

    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?

  • vishal
    vishal Partner, Dataiku DSS Core Designer, Registered Posts: 7 Partner

    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
    CoreyS Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 1,150 ✭✭✭✭✭✭✭✭✭

    We’re glad you were able to figure it out @vishal
    !

Setup Info
    Tags
      Help me…