Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: quart-trio
3 Version: 0.13.0
4 Summary: A Quart extension to provide trio support
5 Author-Email: pgjones <[email protected]>
6 License: MIT
7 Classifier: Development Status :: 3 - Alpha
8 Classifier: Environment :: Web Environment
9 Classifier: Intended Audience :: Developers
10 Classifier: License :: OSI Approved :: MIT License
11 Classifier: Operating System :: OS Independent
12 Classifier: Programming Language :: Python
13 Classifier: Programming Language :: Python :: 3.13
14 Classifier: Programming Language :: Python :: 3.14
15 Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
16 Classifier: Topic :: Software Development :: Libraries :: Python Modules
17 Requires-Python: >=3.13
18 Requires-Dist: hypercorn[trio]>=0.12.0
19 Requires-Dist: quart>=0.23
20 Requires-Dist: trio>=0.19.0
21 Provides-Extra: docs
22 Requires-Dist: pydata_sphinx_theme; extra == "docs"
23 Description-Content-Type: text/x-rst
24
25 Quart-Trio
26 ==========
27
28 |Build Status| |docs| |pypi| |python| |license|
29
30 Quart-Trio is an extension for `Quart
31 <https://github.com/pallets/quart>`__ to support the `Trio
32 <https://trio.readthedocs.io/en/latest/>`_ event loop. This is an
33 alternative to using the asyncio event loop present in the Python
34 standard library and supported by default in Quart.
35
36 Quickstart
37 ----------
38
39 QuartTrio can be installed via `pip
40 <https://docs.python.org/3/installing/index.html>`_,
41
42 .. code-block:: console
43
44 $ pip install quart-trio
45
46 and requires Python 3.13 or higher (see `python version support
47 <https://quart.palletsprojects.com/en/latest/discussion/python_versions.html>`_
48 for reasoning).
49
50 A minimal Quart example is,
51
52 .. code-block:: python
53
54 from quart import websocket
55 from quart_trio import QuartTrio
56
57 app = QuartTrio(__name__)
58
59 @app.route('/')
60 async def hello():
61 return 'hello'
62
63 @app.websocket('/ws')
64 async def ws():
65 while True:
66 await websocket.send('hello')
67
68 app.run()
69
70 if the above is in a file called ``app.py`` it can be run as,
71
72 .. code-block:: console
73
74 $ python app.py
75
76 To deploy in a production setting see the `deployment
77 <https://quart-trio.readthedocs.io/en/latest/tutorials/deployment.html>`_
78 documentation.
79
80 Contributing
81 ------------
82
83 Quart-Trio is developed on `GitHub
84 <https://github.com/pgjones/quart-trio>`_. You are very welcome to
85 open `issues <https://github.com/pgjones/quart-trio/issues>`_ or
86 propose `merge requests
87 <https://github.com/pgjones/quart-trio/merge_requests>`_.
88
89 Testing
90 ~~~~~~~
91
92 The best way to test Quart-Trio is with Tox,
93
94 .. code-block:: console
95
96 $ pip install tox
97 $ tox
98
99 this will check the code style and run the tests.
100
101 Help
102 ----
103
104 The `Quart-Trio <https://quart-trio.readthedocs.io>`__ and `Quart
105 <https://quart.palletsprojects.com>`__ documentation are the best
106 places to start, after that try searching `stack overflow
107 <https://stackoverflow.com/questions/tagged/quart>`_, if you still
108 can't find an answer please `open an issue
109 <https://github.com/pgjones/quart-trio/issues>`_.
110
111
112 .. |Build Status| image:: https://github.com/pgjones/quart-trio/actions/workflows/ci.yml/badge.svg
113 :target: https://github.com/pgjones/quart-trio/commits/main
114
115 .. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg
116 :target: https://quart-trio.readthedocs.io
117
118 .. |pypi| image:: https://img.shields.io/pypi/v/quart-trio.svg
119 :target: https://pypi.python.org/pypi/Quart-Trio/
120
121 .. |python| image:: https://img.shields.io/pypi/pyversions/quart-trio.svg
122 :target: https://pypi.python.org/pypi/Quart-Trio/
123
124 .. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
125 :target: https://github.com/pgjones/quart-trio/blob/main/LICENSE