Quart


NameQuart JSON
Version 0.19.5 PyPI version JSON
download
home_pagehttps://github.com/pallets/quart/
SummaryA Python ASGI web microframework with the same API as Flask
upload_time2024-04-01 18:50:02
maintainerNone
docs_urlNone
authorpgjones
requires_python>=3.8
licenseMIT
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/49/f5/cf1b29053ffa0340166159c854ebbd8400fa32a9e9c12f75a06083cebf9d/quart-0.19.5.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.5",
    "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": "fbe8f85e0c9609cfc8bf7634b107a938bb22e20112d3d5218f783ff8f8568110",
                "md5": "503ef8991f3eb35162bfa6184efbd04a",
                "sha256": "581d959bda40d3c45500c50007a6451a157fd381c70d3556811bdd334adb9657"
            },
            "downloads": -1,
            "filename": "quart-0.19.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "503ef8991f3eb35162bfa6184efbd04a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 78106,
            "upload_time": "2024-04-01T18:49:59",
            "upload_time_iso_8601": "2024-04-01T18:49:59.822110Z",
            "url": "https://files.pythonhosted.org/packages/fb/e8/f85e0c9609cfc8bf7634b107a938bb22e20112d3d5218f783ff8f8568110/quart-0.19.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49f5cf1b29053ffa0340166159c854ebbd8400fa32a9e9c12f75a06083cebf9d",
                "md5": "04f223febf08fa844a02eb27d1987f80",
                "sha256": "fbe3cff25cd18b5c0e8d82bbeeaa43d78f35e5221ca5c50bb0b7c20255c87ab8"
            },
            "downloads": -1,
            "filename": "quart-0.19.5.tar.gz",
            "has_sig": false,
            "md5_digest": "04f223febf08fa844a02eb27d1987f80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 65486,
            "upload_time": "2024-04-01T18:50:02",
            "upload_time_iso_8601": "2024-04-01T18:50:02.805581Z",
            "url": "https://files.pythonhosted.org/packages/49/f5/cf1b29053ffa0340166159c854ebbd8400fa32a9e9c12f75a06083cebf9d/quart-0.19.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-01 18:50:02",
    "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"
}
        
Elapsed time: 0.21955s