File: curio-example.rst

package info (click to toggle)
python-h2 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,652 kB
  • sloc: python: 11,141; makefile: 14; sh: 12
file content (17 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Curio Example Server
====================

This example is a basic HTTP/2 server written using `curio`_, David Beazley's
example of how to build a concurrent networking framework using Python 3.5's
new ``async``/``await`` syntax.

This example is notable for demonstrating the correct use of HTTP/2 flow
control with h2. It is also a good example of the brand new syntax.

.. literalinclude:: ../../examples/curio/curio-server.py
   :language: python
   :linenos:
   :encoding: utf-8


.. _curio: https://curio.readthedocs.org/en/latest/