asgi.rst
This file
Path
docs/deploying/asgi.rst
27 lines · 673 bytes
Last changed by
Update link to hypercorn (#5313)David Lordbefore adoption8d9519d
History of this fileTake it
The walk stopped after 200 commits: lines older than 73739a2 point at it.
Merge branch '2.2.x'David Lordbefore adoption73739a2
lines 1–22why, one step back1ASGI2====34If you'd like to use an ASGI server you will need to utilise WSGI to5ASGI middleware. The asgiref6`WsgiToAsgi <https://github.com/django/asgiref#wsgi-to-asgi-adapter>`_7adapter is recommended as it integrates with the event loop used for8Flask's :ref:`async_await` support. You can use the adapter by9wrapping the Flask app,1011.. code-block:: python1213 from asgiref.wsgi import WsgiToAsgi14 from flask import Flask1516 app = Flask(__name__)1718 ...1920 asgi_app = WsgiToAsgi(app)2122and then serving the ``asgi_app`` with the ASGI server, e.g. usingUpdate link to hypercorn (#5313)David Lordbefore adoption8d9519d
line 23why, one step back23`Hypercorn <https://github.com/pgjones/hypercorn>`_,Merge branch '2.2.x'David Lordbefore adoption73739a2
lines 24–27why, one step back2425.. sourcecode:: text2627 $ hypercorn module:asgi_app