8000 GitHub - zhengxiaowai/quart: fork from gitlab
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zhengxiaowai/quart

Repository files navigation

Quart

Build Status docs

Quart is a Python asyncio web microframework with the same API as Flask. Quart should provide a very minimal step to use Asyncio in a Flask app.

Quickstart

Quart can be installed via pip pip install quart and requires Python 3.6+. A minimal Quart example would be

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.

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 for full details.

About

fork from gitlab

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0