Debian Codegraph @

PKG-INFO

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