Deploying Quart-Trio#

It is not recommended to run Quart-Trio apps directly (via run()) in production. Instead it is recommended that Hypercorn is used. This is becuase the run() enables features that help development yet slow production performance. Hypercorn is installed with QuartTrio and will be used to serve requests in development mode by default (e.g. with run()).

Hypercorn is recommended as it is the only ASGI server that supports Trio.

To use Quart with an ASGI server simply point the server at the Quart application, for example for a simple application in a file called,

from quart_trio import QuartTrio

app = QuartTrio(__name__)

async def hello():
    return 'Hello World'

you can run with Hypercorn using,

hypercorn -k trio example:app

See the Hypercorn docs.