Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Consequences of using FlaskAsgiAdapter? #4

Closed
Korijn opened this issue Sep 20, 2018 · 1 comment
Closed

Consequences of using FlaskAsgiAdapter? #4

Korijn opened this issue Sep 20, 2018 · 1 comment

Comments

@Korijn
Copy link

Korijn commented Sep 20, 2018

I'm impressed with your repo, it's great for getting more insight on ASGI.

I saw the Flask ASGI Adapter (which completely blew my mind, just considering Flask could run websockets like that) and I'm wondering what the catch is? What parts of Flask won't work?

@jordaneremieff
Copy link
Owner

@Korijn Thanks! I'm happy it is helpful.

I haven't specifically tested to what extent any of the WSGI frameworks could be used with the adapter classes, but they are all very limited at present. The examples here generally present a wrapper around a simple application, making use of its routing methods and HTML rendering, and hack on a protocol router to allow routing websocket consumers alongside a converted WSGI->ASGI instance.

Any non-trivial integration of ASGI into Flask will require much more than what these adapters could provide. Fortunately, Flask intends to support ASGI for Python 3.7+, you can read more about the developments here: pallets/werkzeug#1322.

You may also want to take a look into Quart, which is an ASGI microframework that has the same API as Flask.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants