A Quart extension to provide trio support
Project description
Quart-Trio is an extension for Quart to support the Trio event loop. This is an alternative to using the asyncio event loop present in the Python standard library and supported by default in Quart.
Quickstart
QuartTrio can be installed via pip,
$ pip install quart-trio
and requires Python 3.7.0 or higher (see python version support for reasoning).
A minimal Quart example is,
from quart import websocket
from quart_trio import QuartTrio
app = QuartTrio(__name__)
@app.route('/')
async def hello():
return 'hello'
@app.websocket('/ws')
async def ws():
while True:
await websocket.send('hello')
app.run()
if the above is in a file called app.py it can be run as,
$ python app.py
To deploy in a production setting see the deployment documentation.
Contributing
Quart-Trio is developed on GitLab. You are very welcome to open issues or propose merge requests.
Testing
The best way to test Quart-Trio is with Tox,
$ pip install tox
$ tox
this will check the code style and run the tests.
Help
The Quart-Trio and Quart documentation are the best places to start, after that try searching stack overflow, if you still can’t find an answer please open an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for quart_trio-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d94608c9ab11fae370d865897a0b482fb8e4d73b7bf1c37f3f6741b03e31ecdc |
|
MD5 | d079e6fd939d90774308858612bea59a |
|
BLAKE2b-256 | 75a42a713d1c40f354c4053f71fafeb1120bf6aecdd16e351f1faa635de9673b |