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
2
votes
1 answer

Autobahn websocket client in Quart (async Flask) application

Good evening everyone. I'm not quite new to this place but finally decided to register and ask for a help. I develop a web application using Quart framework (asynchronous Flask). And now as application became bigger and more complex I decided to…
Andrew K
  • 41
  • 4
2
votes
1 answer

How to make a an async connection to couchbase server from Flask (Quart) app?

I am trying to convert a Flask app to a Quart app to add async module and gain some performance as discussed in this article. For this, I am connecting to a Couchbase bucket using the acouchbase.Bucket object. The problem is quart is slower and it…
e_kapti
  • 61
  • 5
2
votes
1 answer

Quart infinite/indefinite streaming response

I am trying to create a server (loosely) based on an old blog post to stream video with Quart. To stream video to a client, it seems all I should need to do is have a route that returns a generator of frames. However, actually doing this results in…
c-x-berger
  • 991
  • 12
  • 30
2
votes
2 answers

How to stop logging access log to stdout with Quart Python

I have microservice written in Quart python. I would like to stop logging on to stdout. So far I have tried app.logger.disabled = True and Flask alike import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) Havent achieved…
aCoopML
  • 21
  • 2
2
votes
1 answer

Websockets with the python web framework "quart"?

I need help with the python web frame work, Quart, more specifically the websockets. I would like to be able to register a client when it connects (add it to a python list), and unregister them (remove it from the python list) when it disconnects. …
Dup Dup
  • 55
  • 9
1
vote
0 answers

How can I change the debug-level and format for the Quart (i.e. hypercorn) logger?

I'm trying to set the level and format for the loggers used by the Quart module the way I did it successfully for other 'foreign' loggers: by running basicConfig and implicitly setting up the root-logger or later by running…
frans
  • 8,868
  • 11
  • 58
  • 132
1
vote
1 answer

Got must be real number, not BadRequest error when I am trying to return http error

I am building a python api using quart, and using foreman to run it. When I am trying to return some error code, it does not run correctly but returns a html and tells me it needs to be real number, not bad request. My code looks like this for…
Ming Chen
  • 11
  • 4
1
vote
1 answer

Telethon "Cannot send requests while disconnected" while getting channels in quart route

I'm using telethon and quart on the same loop. I need to listen for new messages and in the same time i would like to read all channels when a page is loaded. But doing this will end in a ConnectionError: Cannot send requests while disconnected and…
Paolo7297
  • 13
  • 4
1
vote
1 answer

Quart: ImportError: cannot import name 'Headers' from 'h11._headers' when using Docker

Get the following error when trying to start up a docker container. web | Traceback (most recent call last): web | File "app.py", line 4, in web | from quart import Quart, render_template, redirect, request,…
Bob Karschnia
  • 11
  • 1
  • 3
1
vote
0 answers

Quart and psycopg3 AsyncConnection notifies() -> SSE multiple clients

I am trying to create an SSE server Quart application that listens to notifications from a postgresql instance (and then sends an SSE message to registered EventSources). Have gotten a simplified version of…
David I
  • 31
  • 1
  • 5
1
vote
2 answers

Quart error: "ImportError: cannot import name 'Headers' from 'h11._headers'"

I want to start a dashboard for my nextcord bot. But when I imported my dashboard module with the line import quart it raises an error. I did not find any other posts about this. Error/Traceback Traceback (most recent call last): File "main.py",…
Tinsk
  • 23
  • 1
  • 5
1
vote
1 answer

Why to request info logs generate in Quart but not Hypercorn?

I am trying to enable all requests to be logged (to centralized logging system) in a Quart microservice. However this only occurs when running directly in Python, and when running in Hypercorn it only logs major events and errors. Running from…
Brendan Hill
  • 3,406
  • 4
  • 32
  • 61
1
vote
0 answers

Multiplayer game in Python with websockets: Wait for multiple input

I'm developing a text game in Python implementing the networking part using Quart and websockets. I'm done with the single player part which is a simple single request- single response thing and next I want to implement a PvP part. Reading the Quart…
Nick M
  • 69
  • 7
1
vote
1 answer

How do I get the list of servers where the user has bot permissions

so I'm working on a discord bot dashboard with pycord and quart and now I need to make a page similar to this from https://mee6.xyz. The tricky part is that I can't figure out is getting a list of all the servers where they have elevated permissions…
1
vote
1 answer

Telethon event handler does not work with Hypercorn

I am trying to use Quart with Hypercorn and Telethon. I have a message listener, but since I integrated Quart and Telethon, the listener does not fire any more (please see the minimal reproducible example below). Has anybody an idea why this code…
DasElias
  • 569
  • 8
  • 19
1 2
3
11 12