Questions tagged [quart]

Quart is a microframework for developing web applications using Python's asyncio library.

Quart is an evolution of the Flask API to work with Asyncio and to provide a number of features not present or possible in Flask.

Compatibility with the Flask API is, however, the main aim, which means that the Flask documentation is an additional useful source of help.

The latest documentation for Quart can be found here

Quart is developed on GitLab. You are very welcome to open issues or propose merge requests.

167 questions
0
votes
1 answer

FLASK_APP for Quart

I've very interested in taking advantage of some of the async mechanisms available in Quart. Larger Flask apps can be laid out in packages, mine are too. They then require a FLASK_APP environment variable to be set with the name of that package. Is…
Oliver Shaw
  • 5,235
  • 4
  • 26
  • 35
0
votes
1 answer

Jinja2 - Object behaving differently inside for loop

I have an object (a QuerySet result from an ORM called tortoise-orm, but I think it doesn't matter) that behaves differently if I iterate it with a Jinja2's for loop. Consider the object tasks as an iterable object. For example, this works fine, it…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
0
votes
1 answer

Hypercorn - Can't find __main__ module in folder

I'm using Quart(Flask async) with debug=True and its builtin Hypercorn server, but everytime I save a file and the application tries to restart, I get : C:\Users\myusername.virtualenvs\App-GtW9WS3s\Scripts\python.exe: can't find '__main__' module…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
0
votes
0 answers

how to send messages to clients with websocket outside of `@app.websocket` decorated functions?

I'm using quart as the back-end of a web game. I have a stub of the game event loop and a priority queue, when something completes from the priority queue the game loop do further processing and then is required to send an update to the player or…
shackra
  • 277
  • 3
  • 16
  • 56
0
votes
2 answers

Tracking dangling threads in python

I've got a python 3.7.2 asyncio based application. There is an endpoint exposing some thread info: threads_info = {} for thread in enumerate(): threads_info[thread.__str__()] = traceback.format_stack(sys._current_frames()[thread.ident]) For all…
0
votes
1 answer

python making a post file request

Hi guys I'm developing a Python 3 quart asyncio application and I'm trying to setup a test framework around my http API. Quart has methods to build json, form and raw requests but no files request. I believe I need build the request packet myself…
mitch
  • 37
  • 6
0
votes
1 answer

How to use javascript data in Quart/Flask/Jinja2 template tag?

I am using websockets within my Quart app in place of ajax. The aim is to be able to post a comment. A Quart websocket endpoint handles the backend side of things, and then I would like to append the comment to the page instantly from the data…
Jamie Lindsey
  • 928
  • 14
  • 26
0
votes
0 answers

What would cause Flask-WTForms to return None for every field?

I have several forms which all work as expected when I run the app locally. But when I attempt to use any form on the same app proxied via nginx every form returns None for each field. If I print the form.data it returns: {'display_name': None,…
Jamie Lindsey
  • 928
  • 14
  • 26
0
votes
0 answers

Uploading multiple files with Quart/Flask adds file-objects to form as bytes and nothing to files

I have a webpage (web-app) that allows users to upload files to the server. The server side is Python Quart(async Flask) with hypercorn server behind Nginx. The problem, I am unable to upload multiple files. A single file uploads without any issue…
blindChicken
  • 352
  • 4
  • 13
0
votes
2 answers

Repeat the Quartz job only for specific counts

i need to trigger a job at particular time on particular weekdays. these weekdays are also dynamic and should be fetched from db.Also the job should trigger or repeat itself for particular count. let us say a Job j should trigger on every mon, wed,…
Deepak Verma
  • 617
  • 5
  • 18
0
votes
1 answer

Quart JSON encoding

as first time Quart user, I struggle defining json encoder / decoder. I have nested objects like this: class ObjA: def __init__(self, name, color): self.name = name self.__color = color class Color: def __init__(self, t): …
Roby
  • 2,011
  • 4
  • 28
  • 55
0
votes
1 answer

Catch-All URL in quart

I am trying to create catch-all-url route in quart similar to what we have in flask, but the route is not working as expected. Flask: from flask import Flask, request app = Flask(__name__) @app.route('/', defaults={'path':…
thotam
  • 941
  • 2
  • 16
  • 31
-1
votes
1 answer

TypeError: The response value (coroutine) is not valid

I was trying to deply my web application using quart and hypercorn but it raised: TypeError: The response value type (coroutine) is not valid I don't know what happened, this is my code: # import os, quart from hypercorn import…
-1
votes
1 answer

How to run a parallel process with Quart-Trio and Hypercorn?

I have a web site on Quart-Trio and Hypercorn. There is a page /search made with Whoosh. Some search operations can take up to ~6 seconds. In production it would probably interfere with the site availability for other users. So I think I need to run…
chang zhao
  • 144
  • 5
-1
votes
1 answer

Importing a Flask extension in Quart using Blueprints

I am currently building a basic application in which I am carrying out measurements with a sensor connected to the hosting Raspberry Pi. To do so, I have decided to go for Quart, as it allows me to run them in the background. I am currently trying…
1 2 3
11
12