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.8 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 GitHub. 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
File details
Details for the file quart_trio-0.11.1.tar.gz
.
File metadata
- Download URL: quart_trio-0.11.1.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 149c9c65c2faafdf455a4461b600e1983b71e593b6f8c8b91b592bbda36cea98 |
|
MD5 | d7ee9eb505f0263635c75db0832ace0e |
|
BLAKE2b-256 | b621b644db3cd4c0055af99c3e6f4fb066921fe0e21cf55afcef85208c8efa93 |
File details
Details for the file quart_trio-0.11.1-py3-none-any.whl
.
File metadata
- Download URL: quart_trio-0.11.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4da1ab7699e44357f7788e1b5a30158680e999cf6b8e9ee762ce22164218bc0 |
|
MD5 | 5883b0ab1ca0fb7a5cb7a7aa704404a1 |
|
BLAKE2b-256 | cb619320f40bc363095bdb0c5e0c94b99cd582decfa61c2094f60d068fafe077 |