Name | Quart JSON |
Version |
0.19.8
JSON |
| download |
home_page | https://github.com/pallets/quart/ |
Summary | A Python ASGI web microframework with the same API as Flask |
upload_time | 2024-10-25 22:39:45 |
maintainer | None |
docs_url | None |
author | pgjones |
requires_python | >=3.8 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Quart
=====
.. image:: https://raw.githubusercontent.com/pallets/quart/main/artwork/logo.png
:alt: Quart logo
|Build Status| |docs| |pypi| |python| |license| |chat|
Quart is an async Python web microframework. Using Quart you can,
* render and serve HTML templates,
* write (RESTful) JSON APIs,
* serve WebSockets,
* stream request and response data,
* do pretty much anything over the HTTP or WebSocket protocols.
Quickstart
----------
Quart can be installed via `pip
<https://docs.python.org/3/installing/index.html>`_,
.. code-block:: console
$ pip install quart
and requires Python 3.8.0 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 Quart, render_template, websocket
app = Quart(__name__)
@app.route("/")
async def hello():
return await render_template("index.html")
@app.route("/api")
async def json():
return {"hello": "world"}
@app.websocket("/ws")
async def ws():
while True:
await websocket.send("hello")
await websocket.send_json({"hello": "world"})
if __name__ == "__main__":
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 this app in a production setting see the `deployment
<https://quart.palletsprojects.com/en/latest/tutorials/deployment.html>`_
documentation.
Contributing
------------
Quart is developed on `GitHub <https://github.com/pallets/quart>`_. If
you come across an issue, or have a feature request please open an
`issue <https://github.com/pallets/quart/issues>`_. If you want to
contribute a fix or the feature-implementation please do (typo fixes
welcome), by proposing a `merge request
<https://github.com/pallets/quart/pulls>`_.
Testing
^^^^^^^
The best way to test Quart is with `Tox
<https://tox.readthedocs.io>`_,
.. code-block:: console
$ pip install tox
$ tox
this will check the code style and run the tests.
Help
----
The Quart `documentation <https://quart.palletsprojects.com>`_ or
`cheatsheet
<https://quart.palletsprojects.com/en/latest/reference/cheatsheet.html>`_
are the best places to start, after that try searching `stack overflow
<https://stackoverflow.com/questions/tagged/quart>`_ or ask for help
`on discord <https://discord.gg/pallets>`_. If you still
can't find an answer please `open an issue
<https://github.com/pallets/quart/issues>`_.
Relationship with Flask
-----------------------
Quart is an asyncio reimplementation of the popular `Flask
<https://flask.palletsprojects.com>`_ microframework API. This means that if you
understand Flask you understand Quart.
Like Flask, Quart has an ecosystem of extensions for more specific
needs. In addition a number of the Flask extensions work with Quart.
Migrating from Flask
^^^^^^^^^^^^^^^^^^^^
It should be possible to migrate to Quart from Flask by a find and
replace of ``flask`` to ``quart`` and then adding ``async`` and
``await`` keywords. See the `docs
<https://quart.palletsprojects.com/en/latest/how_to_guides/flask_migration.html>`_
for more help.
.. |Build Status| image:: https://github.com/pallets/quart/actions/workflows/tests.yaml/badge.svg
:target: https://github.com/pallets/quart/commits/main
.. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg
:target: https://quart.palletsprojects.com
.. |pypi| image:: https://img.shields.io/pypi/v/quart.svg
:target: https://pypi.python.org/pypi/Quart/
.. |python| image:: https://img.shields.io/pypi/pyversions/quart.svg
:target: https://pypi.python.org/pypi/Quart/
.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://github.com/pallets/quart/blob/main/LICENSE
.. |chat| image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg
:target: https://discord.gg/pallets
Raw data
{
"_id": null,
"home_page": "https://github.com/pallets/quart/",
"name": "Quart",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "pgjones",
"author_email": "philip.graham.jones@googlemail.com",
"download_url": "https://files.pythonhosted.org/packages/ff/e5/e804c8c04f9a6642647564fa27be992144743376e36085a4f5b760b15973/quart-0.19.8.tar.gz",
"platform": null,
"description": "Quart\n=====\n\n.. image:: https://raw.githubusercontent.com/pallets/quart/main/artwork/logo.png\n :alt: Quart logo\n\n|Build Status| |docs| |pypi| |python| |license| |chat|\n\nQuart is an async Python web microframework. Using Quart you can,\n\n* render and serve HTML templates,\n* write (RESTful) JSON APIs,\n* serve WebSockets,\n* stream request and response data,\n* do pretty much anything over the HTTP or WebSocket protocols.\n\nQuickstart\n----------\n\nQuart can be installed via `pip\n<https://docs.python.org/3/installing/index.html>`_,\n\n.. code-block:: console\n\n $ pip install quart\n\nand requires Python 3.8.0 or higher (see `python version support\n<https://quart.palletsprojects.com/en/latest/discussion/python_versions.html>`_\nfor reasoning).\n\nA minimal Quart example is,\n\n.. code-block:: python\n\n from quart import Quart, render_template, websocket\n\n app = Quart(__name__)\n\n @app.route(\"/\")\n async def hello():\n return await render_template(\"index.html\")\n\n @app.route(\"/api\")\n async def json():\n return {\"hello\": \"world\"}\n\n @app.websocket(\"/ws\")\n async def ws():\n while True:\n await websocket.send(\"hello\")\n await websocket.send_json({\"hello\": \"world\"})\n\n if __name__ == \"__main__\":\n app.run()\n\nif the above is in a file called ``app.py`` it can be run as,\n\n.. code-block:: console\n\n $ python app.py\n\nTo deploy this app in a production setting see the `deployment\n<https://quart.palletsprojects.com/en/latest/tutorials/deployment.html>`_\ndocumentation.\n\nContributing\n------------\n\nQuart is developed on `GitHub <https://github.com/pallets/quart>`_. If\nyou come across an issue, or have a feature request please open an\n`issue <https://github.com/pallets/quart/issues>`_. If you want to\ncontribute a fix or the feature-implementation please do (typo fixes\nwelcome), by proposing a `merge request\n<https://github.com/pallets/quart/pulls>`_.\n\nTesting\n^^^^^^^\n\nThe best way to test Quart is with `Tox\n<https://tox.readthedocs.io>`_,\n\n.. code-block:: console\n\n $ pip install tox\n $ tox\n\nthis will check the code style and run the tests.\n\nHelp\n----\n\nThe Quart `documentation <https://quart.palletsprojects.com>`_ or\n`cheatsheet\n<https://quart.palletsprojects.com/en/latest/reference/cheatsheet.html>`_\nare the best places to start, after that try searching `stack overflow\n<https://stackoverflow.com/questions/tagged/quart>`_ or ask for help\n`on discord <https://discord.gg/pallets>`_. If you still\ncan't find an answer please `open an issue\n<https://github.com/pallets/quart/issues>`_.\n\nRelationship with Flask\n-----------------------\n\nQuart is an asyncio reimplementation of the popular `Flask\n<https://flask.palletsprojects.com>`_ microframework API. This means that if you\nunderstand Flask you understand Quart.\n\nLike Flask, Quart has an ecosystem of extensions for more specific\nneeds. In addition a number of the Flask extensions work with Quart.\n\nMigrating from Flask\n^^^^^^^^^^^^^^^^^^^^\n\nIt should be possible to migrate to Quart from Flask by a find and\nreplace of ``flask`` to ``quart`` and then adding ``async`` and\n``await`` keywords. See the `docs\n<https://quart.palletsprojects.com/en/latest/how_to_guides/flask_migration.html>`_\nfor more help.\n\n\n.. |Build Status| image:: https://github.com/pallets/quart/actions/workflows/tests.yaml/badge.svg\n :target: https://github.com/pallets/quart/commits/main\n\n.. |docs| image:: https://img.shields.io/badge/docs-passing-brightgreen.svg\n :target: https://quart.palletsprojects.com\n\n.. |pypi| image:: https://img.shields.io/pypi/v/quart.svg\n :target: https://pypi.python.org/pypi/Quart/\n\n.. |python| image:: https://img.shields.io/pypi/pyversions/quart.svg\n :target: https://pypi.python.org/pypi/Quart/\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-blue.svg\n :target: https://github.com/pallets/quart/blob/main/LICENSE\n\n.. |chat| image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg\n :target: https://discord.gg/pallets\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python ASGI web microframework with the same API as Flask",
"version": "0.19.8",
"project_urls": {
"Documentation": "https://quart.palletsprojects.com",
"Homepage": "https://github.com/pallets/quart/",
"Repository": "https://github.com/pallets/quart/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "311d39c37e6f7562aab1dc32804c646c3b412cfb50c813a91116d7cb940932ae",
"md5": "8b16fdbdf211bc49b0cb5ab5cba84c70",
"sha256": "34eeb559014f4e72e093d034cfe203b1a6262e9d3504f826f293090e230609f2"
},
"downloads": -1,
"filename": "quart-0.19.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b16fdbdf211bc49b0cb5ab5cba84c70",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 78273,
"upload_time": "2024-10-25T22:39:44",
"upload_time_iso_8601": "2024-10-25T22:39:44.030062Z",
"url": "https://files.pythonhosted.org/packages/31/1d/39c37e6f7562aab1dc32804c646c3b412cfb50c813a91116d7cb940932ae/quart-0.19.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ffe5e804c8c04f9a6642647564fa27be992144743376e36085a4f5b760b15973",
"md5": "b0f661087289e6a0d38db9877eecf5a1",
"sha256": "ef567d0be7677c99890d5c6ff30e679699fe7e5fca1a90fa3b6974edd8421794"
},
"downloads": -1,
"filename": "quart-0.19.8.tar.gz",
"has_sig": false,
"md5_digest": "b0f661087289e6a0d38db9877eecf5a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 65645,
"upload_time": "2024-10-25T22:39:45",
"upload_time_iso_8601": "2024-10-25T22:39:45.476141Z",
"url": "https://files.pythonhosted.org/packages/ff/e5/e804c8c04f9a6642647564fa27be992144743376e36085a4f5b760b15973/quart-0.19.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 22:39:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pallets",
"github_project": "quart",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "quart"
}