tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

asyncio-example.rst (535B)


      1 Asyncio Example Server
      2 ======================
      3 
      4 This example is a basic HTTP/2 server written using `asyncio`_, using some
      5 functionality that was introduced in Python 3.5. This server represents
      6 basically just the same JSON-headers-returning server that was built in the
      7 :doc:`basic-usage` document.
      8 
      9 This example demonstrates some basic asyncio techniques.
     10 
     11 .. literalinclude:: ../../examples/asyncio/asyncio-server.py
     12   :language: python
     13   :linenos:
     14   :encoding: utf-8
     15 
     16 
     17 .. _asyncio: https://docs.python.org/3/library/asyncio.html