You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the same way asgiref.wsgi.WsgiToAsgi converts a WSGI application to ASGI, is there a standard way to convert an ASGI application to WSGI?
My use case is that I want to leverage FastAPI to create my REST api, but I'm working on a legacy flask application. If I can convert my ASGI app to WSGI, I can easily mount it on the legacy application using werkzeug.middleware.dispatcher.DispatcherMiddleware.
The text was updated successfully, but these errors were encountered:
There's no standard implementation yet but it's definitely possible, if not very efficient (as you'll need to consume one thread per request). I'd happily take one to sit alongside the other adapter, but I'm not personally planning to work on it.
I think this could be useful in tests, where performance doesn't really matter but being able to swap out a WSGI app for an ASGI app while minimizing the LOC rewritten would be clutch.
In the same way
asgiref.wsgi.WsgiToAsgi
converts a WSGI application to ASGI, is there a standard way to convert an ASGI application to WSGI?My use case is that I want to leverage
FastAPI
to create myREST
api, but I'm working on a legacy flask application. If I can convert my ASGI app to WSGI, I can easily mount it on the legacy application usingwerkzeug.middleware.dispatcher.DispatcherMiddleware
.The text was updated successfully, but these errors were encountered: