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.

91 questions
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
  • 704
  • 14
  • 21
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
  • 8
1
vote
1 answer

How can I run a function after each request to a static resource in Flask?

I have a Flask (It's not actually Flask, it's Quart, an asynchronous version of Flask with the same syntax and features) application that serves static files that are created temporarily by a command line tool. I want to delete the files after they…
Finnbar M
  • 46
  • 4
1
vote
1 answer

Using Quart in Heroku

Right now I'm trying to host a Quart web app on Heroku. Here is my test code: #quartTest.py from quart import Quart, request, Response app = Quart(__name__) @app.route('/') def index(): return 'hello world' if __name__ == '__main__': …
Bento Bot
  • 38
  • 1
  • 4
1
vote
1 answer

Running RabbitMQ Pika with Quart

I am using the Quart framework, but I also need to use the RabbitMQ Pika connector, but I can't get them to play nice as they both have infinite loops. Entrypoint: from quart import Quart from .service import Service app =…
Gemma Morriss
  • 741
  • 3
  • 10
  • 30
1
vote
1 answer

Can Make PUT and GET calls to Quart Schema, but not POST?

I am working on developing an API for a web application using Quart and Quart-Schema. GET and PUT calls to the API work fine. The API is running in Kubernetes hosted on DigitalOcean. All the calls work fine on the docs page. POST calls are not…
1
vote
1 answer

asyncio Discord bot session timeout on Quart web app

I'm trying to implement a discord bot connection to a web app running on Quart. I tried using one of the solutions posted here, which works for a while, but after about 24 hours the app breaks returning asyncio.exceptions.TimeoutError data =…
TheV
  • 43
  • 6
1
vote
0 answers

Hypercorn Name does not resolve in Docker

I am trying to test my Quart application (pager) that connects to a MySQL instance in a docker container called master-db, but after a few retries I get a hypercorn error: pager | Traceback (most recent call last): pager | File…
Gemma Morriss
  • 741
  • 3
  • 10
  • 30
1
vote
1 answer

Python Quart Unable to shutdown background task

I am working on a Python app, but I am moving from Flask to Quart. The application needs a background task that runs constantly whilst the application is running. When I try to stop the process using control-c, the thread doesn't close cleanly and…
Gemma Morriss
  • 741
  • 3
  • 10
  • 30
1
vote
1 answer

Quart python : send websocket broadcast message from curl and display it

i have edited this way: my curl command is: curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://localhost:5000/telepath i want to display this posted data on every clients. i grabed what i can on…
laticoda
  • 55
  • 11
1
vote
1 answer

How to use logging in Python Quart route handler?

I'm new to hypercorn+uvloop+quart. I'm trying to create following files and print some info/debug log in the route handler but nothing shows up. I have debugged into the route handler and noticed the dog_server.logger.disabled = True. Does anyone…
NonStatic
  • 773
  • 1
  • 6
  • 23
1
vote
1 answer

How to turn on debug mode with hypercorn.asyncio.serve(app,quart_cfg)

Have problem with using quart server with telethon library, but cannot handle the error. Trying to turn debug mode on, but it says that Warning: The config debughas no affect when using serve warnings.warn("The configdebug has no affect when using…
lorrod
  • 11
  • 1
1
vote
1 answer

Websockets in python Quart with multiple workers?

Websockets in python Quart with multiple workers? Is there a solution to broadcast a message when my app is launched across multiple workers - for example using hypercorn? I'm currently launching my app like this: $ hypercorn -b 127.0.0.1:8000 -w 4…
go-pera
  • 11
  • 2
1
vote
1 answer

Modifying quart.request - acceptable? (Python API)

I need to store some per-request metrics and telemetry (such as timestamps, etc) in quart (the python web framework). Is it acceptable behaviour to modify quart.request and add variables? It appears to work, and it's similar to how I would have…
Niklas B
  • 1,411
  • 13
  • 28