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

Python, run a background task while not blocking the api thread, using Quart

I am trying to create a python api that works on the input data and run different scripts according to the provided input. I was using flask + gunicorn earlier with 8 workers. I got to know about asyncio library and I switched from flask to quart…
dper
  • 884
  • 1
  • 8
  • 31
0
votes
0 answers

Running Hypercorn in Docker with custom directory/app location and name

I'm fairly new to Docker and am building a series of Python containers for practice. One of my goals is to be able to dynamically set the directory and app/module locations via environment variables. I've done this with Flask/Gunicorn and it…
John Heyer
  • 711
  • 1
  • 6
  • 18
0
votes
1 answer

Accept/Content-Type header based processing in Quart and Quart-Schema

Because I am rewriting a legacy app, I cannot change what the clients either send or accept. I have to accept and return JSON, HTML, and an in-house XML-like serialization. They do, fortunately set headers that describe what they are sending and…
coyot
  • 418
  • 1
  • 3
  • 12
0
votes
1 answer

Python sched module to enqueue delayed tasks in quart or flask

I want to schedule a task to run after a delay in my quart/flask application whenever a certain query is made. I'm hoping to use the sched module so there are fewer external dependencies, but I'm having difficulty understanding how to set up the…
Rusty Lemur
  • 1,697
  • 1
  • 21
  • 54
0
votes
1 answer

Save values from POST request of a list of dicts

I a trying to expose an API (if that's the correct way to say it). I am using Quart, a python library made out of Flask and this is what my code looks like: async def capture_post_request(request_json): for item in request_json: …
Zoi
  • 7
  • 3
0
votes
1 answer

quart is not able to process multi request from a background task

We are using quart from last 6 months and it was a awesome journey with it. Now we have a new requirement where we need to build a request engine using which we can make request to any url. Now we have tried different url and it work perfectly…
Kundu
  • 3,944
  • 3
  • 16
  • 21
0
votes
1 answer

Running discord bot using quart python

I am trying to create a discord bot with two features. To update everyone in the server about some info (this is done by using webhook and a uptimerobot to call the webhook) Community in the server can prompt the bot to provide additional info by…
Ace Edith
  • 11
  • 3
0
votes
1 answer

Running Quart and Telethon with multiple clients (sessions)

I'm trying to run Quart+Telethon with multiple clients. This example shows one global client. I have this working. Now I need my app to handle multiple users simultaneously logging in and doing stuff. This post suggests using asyncio.gather. How do…
user1552294
  • 125
  • 1
  • 10
0
votes
1 answer

How to use api key authentication with Quart API?

I have a Python/Quart API REST microservice and want to apply API key based authentication. What is the conventional way to do this and what is the general way to store API keys? Can the package do this or do I need to implement my own by manually…
Brendan Hill
  • 3,406
  • 4
  • 32
  • 61
0
votes
1 answer

Python/Quart: how to send while awaiting a response?

Using Python 3.9 and Quart 0.15.1, I'm trying to create a websocket route that will listen on a websocket for incoming request data, parse it, and send outbound response data to a client, over and over in a loop - until and unless the client sends a…
0
votes
1 answer

Add data to request in the route handler using Python Quart

We are working on developing an API using Python Quart. We have multiple routes set-up and a global error handling method @app.errorhandler(InternalServerError) def handle_error(error): We need a way to…
Navaneeth
  • 190
  • 1
  • 1
  • 16
0
votes
0 answers

Quart crashes when saving (Exec format error)

I am running a Quart application. However, when I save any file used by the program, it crashes. I don't even have debug mode on, so it shouldn't be auto-updating. Here's a minimal example that does exhibit this behavior on my machine: from quart…
hyper-neutrino
  • 5,272
  • 2
  • 29
  • 50
0
votes
1 answer

Disable before_serving function while running the pytest in quart

I am using Quart App. I am calling a service in my before_serving(app_initionalization) function and I do not want to call that in pytests. Actually, I want to disable my before_serving function or something like mock it. import…
NVS
  • 400
  • 3
  • 10
0
votes
1 answer

Quart, chat server example

I am trying to make a quart application using multiple websockets at the same time: