wsgi-example.rst (808B)
1 Example HTTP/2-only WSGI Server 2 =============================== 3 4 This example is a more complex HTTP/2 server that acts as a WSGI server, 5 passing data to an arbitrary WSGI application. This example is written using 6 `asyncio`_. The server supports most of PEP-3333, and so could in principle be 7 used as a production WSGI server: however, that's *not recommended* as certain 8 shortcuts have been taken to ensure ease of implementation and understanding. 9 10 The main advantages of this example are: 11 12 1. It properly demonstrates HTTP/2 flow control management. 13 2. It demonstrates how to plug h2 into a larger, more complex 14 application. 15 16 17 .. literalinclude:: ../../examples/asyncio/wsgi-server.py 18 :language: python 19 :linenos: 20 :encoding: utf-8 21 22 23 .. _asyncio: https://docs.python.org/3/library/asyncio.html