Building support for decoupling Dash from Flask and supporting Quart / FastAPI servers#3430
Building support for decoupling Dash from Flask and supporting Quart / FastAPI servers#3430BSd3v wants to merge 123 commits intoplotly:devfrom
Conversation
work to modularize the dash eco-system and decouple from Flask
∙ - added types to BaseFactory to remove linting errors on create app in Flask and Quart Factory
… `request` context
| :param backend: The backend to use for the Dash app. Can be a string | ||
| (name of the backend) or a backend class. Default is None, which | ||
| selects the Flask backend. Currently, "flask", "fastapi", and "quart" backends |
There was a problem hiding this comment.
Does the server param docstring above need an update too?
Question - For the difference between the too - is it you'd use server if you want Dash to use an existing instance of the server? vs backend if you want Dash to create the instance?
There was a problem hiding this comment.
Yes, I believe so.
You should be able to pass a preconfigured server of any of the supported types.
|
@BSd3v This is looking good, I have made some significant changes to the fastapi implementation. The config is now transfered via environment variable and I merged all the middlewares into one. Could you review those changes, then we can merge and release a rc version 🚀 |
|
I dont know that I necessarily agree with keeping the logic of I think we should explicitly make it to where it is set, and if people want to append, then we can possibly expose a secondary headers |
This is an open PR draft, to contribute please target my forked branch.
The goal of this PR is to modularize the Dash setup to be independent of Flask (will fallback to Flask) and allow devs to configure their own backend.
fixes #1571