Skip to main content

A Python asyncio web microframework with the same API as Flask

Project description

Quart
=====

|Build Status| |docs| |pypi|

Quart is a Python asyncio web microframework with the same API as
`Flask <https://github.com/pallets/flask>`_. Quart should provide a
very minimal step to use `Asyncio
<https://docs.python.org/3/library/asyncio.html>`_ in a Flask app.
See the `docs <https://pgjones.gitlab.io/quart/>`_.

Quart accepts requests and serves responses via HTTP/1.1 or
HTTP/2. The HTTP/2 support includes the ability to server push.


Quickstart
----------

Quart can be installed via `pip
<https://docs.python.org/3/installing/index.html>`_ ``pip install quart``
and requires Python 3.6+. A minimal Quart example would be

.. code-block:: python

from quart import Quart

app = Quart(__name__)

@app.route('/')
async def hello():
return 'hello'

app.run()

if the above is in a file called ``app.py`` can be run via ``python app.py``.
To deploy in a production setting see the `docs
<https://pgjones.gitlab.io/quart/deployment.html>`_.

API Compatibility with Flask
----------------------------

The Flask API can be described as consisting of the Flask public and
private APIs and Werkzeug upon which Flask is based. Quart is designed
to be fully compatible with the Flask public API (aside from async and
await keywords). Thereafter the aim is to be mostly compatible with
the Flask private API and to provide no guarantees about the Werkzeug
API.

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://pgjones.gitlab.io/quart/flask_migration.html>`_ for full
details.


.. |Build Status| image:: https://gitlab.com/pgjones/quart/badges/master/build.svg
:target: https://gitlab.com/pgjones/quart/commits/master

.. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest
:target: https://pgjones.gitlab.io/quart/

.. |pypi| image:: https://badge.fury.io/py/quart.svg
:target: https://badge.fury.io/py/quart


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Quart-0.3.1.tar.gz (56.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Quart-0.3.1-py2.py3-none-any.whl (57.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file Quart-0.3.1.tar.gz.

File metadata

  • Download URL: Quart-0.3.1.tar.gz
  • Upload date:
  • Size: 56.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Quart-0.3.1.tar.gz
Algorithm Hash digest
SHA256 79454741842e0f9b9fafedbfed1327461c853aab5a771bd231d74ced28239fb7
MD5 d3e06a46052c4191ac8f65991faf4559
BLAKE2b-256 db133d9e44bc603f29839524bb6d504804cf21294e58ba1f21d1357560a858d6

See more details on using hashes here.

File details

Details for the file Quart-0.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Quart-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a0f8aca4149d0ff3c3ad7193a1b712e3bf9c188234eeeda5c4e82653230e8df3
MD5 bb94ccbb90868cdac0d93d1a4e7ef631
BLAKE2b-256 2e4e14805023a707e07597a9647c60679b87da1de428d889466dbae31250624b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page