Skip to main content

A Quart extension to provide trio support

Project description

Build Status docs pypi python license

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quart_trio-0.12.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

quart_trio-0.12.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file quart_trio-0.12.0.tar.gz.

File metadata

  • Download URL: quart_trio-0.12.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for quart_trio-0.12.0.tar.gz
Algorithm Hash digest
SHA256 02ec840998d0e897eeabc0e5f48c12d8204e91a823870fd0b8b2f7331b44198c
MD5 42747d6de225f1f786edc04da469d426
BLAKE2b-256 0a834f10d638a3a4a8c0272a62be0fd25b3e1e3a93303094d50f3e6772f15677

See more details on using hashes here.

Provenance

The following attestation bundles were made for quart_trio-0.12.0.tar.gz:

Publisher: publish.yml on pgjones/quart-trio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quart_trio-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: quart_trio-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for quart_trio-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d42e3960f8865f18f7022f1f64093bde6de6fc8fa04bbfb1a06fa7e521d3311a
MD5 3e8e7ccdfea74f9067059336816ba3f7
BLAKE2b-256 1525d81afff51d0f7770d0b27c41d910e6a0aa0513ea83dd29014d2f2307d993

See more details on using hashes here.

Provenance

The following attestation bundles were made for quart_trio-0.12.0-py3-none-any.whl:

Publisher: publish.yml on pgjones/quart-trio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page