File: PKG-INFO

package info (click to toggle)
python-quart-trio 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 172 kB
  • sloc: python: 984; makefile: 2
file content (130 lines) | stat: -rw-r--r-- 3,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Metadata-Version: 2.1
Name: quart-trio
Version: 0.12.0
Summary: A Quart extension to provide trio support
Author-Email: pgjones <philip.graham.jones@googlemail.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: exceptiongroup>=1.1.0; python_version < "3.11"
Requires-Dist: hypercorn[trio]>=0.12.0
Requires-Dist: quart>=0.19
Requires-Dist: trio>=0.19.0
Provides-Extra: docs
Requires-Dist: pydata_sphinx_theme; extra == "docs"
Description-Content-Type: text/x-rst

Quart-Trio
==========

|Build Status| |docs| |pypi| |python| |license|

Quart-Trio is an extension for `Quart
<https://github.com/pallets/quart>`__ to support the `Trio
<https://trio.readthedocs.io/en/latest/>`_ 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
<https://docs.python.org/3/installing/index.html>`_,

.. code-block:: console

    $ pip install quart-trio

and requires Python 3.8 or higher (see `python version support
<https://quart.palletsprojects.com/en/latest/discussion/python_versions.html>`_
for reasoning).

A minimal Quart example is,

.. code-block:: python

    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,

.. code-block:: console

    $ python app.py

To deploy in a production setting see the `deployment
<https://quart-trio.readthedocs.io/en/latest/tutorials/deployment.html>`_
documentation.

Contributing
------------

Quart-Trio is developed on `GitHub
<https://github.com/pgjones/quart-trio>`_. You are very welcome to
open `issues <https://github.com/pgjones/quart-trio/issues>`_ or
propose `merge requests
<https://github.com/pgjones/quart-trio/merge_requests>`_.

Testing
~~~~~~~

The best way to test Quart-Trio is with Tox,

.. code-block:: console

    $ pip install tox
    $ tox

this will check the code style and run the tests.

Help
----

The `Quart-Trio <https://quart-trio.readthedocs.io>`__ and `Quart
<https://quart.palletsprojects.com>`__ documentation are the best
places to start, after that try searching `stack overflow
<https://stackoverflow.com/questions/tagged/quart>`_, if you still
can't find an answer please `open an issue
<https://github.com/pgjones/quart-trio/issues>`_.


.. |Build Status| image:: https://github.com/pgjones/quart-trio/actions/workflows/ci.yml/badge.svg
   :target: https://github.com/pgjones/quart-trio/commits/main

.. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg
   :target: https://quart-trio.readthedocs.io

.. |pypi| image:: https://img.shields.io/pypi/v/quart-trio.svg
   :target: https://pypi.python.org/pypi/Quart-Trio/

.. |python| image:: https://img.shields.io/pypi/pyversions/quart-trio.svg
   :target: https://pypi.python.org/pypi/Quart-Trio/

.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
   :target: https://github.com/pgjones/quart-trio/blob/main/LICENSE