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

Is Cloud Run removing the CORS headers from my backend?

I have developed a simple backend in Python, using Quart, Quart-CORS and SQLAlchemy. When I try the different endpoints on localhost with Postman, the CORS headers are correctly returned. As soon as I deploy it on Google Cloud Run, it seems like…
rafamartinc
  • 125
  • 1
  • 1
  • 10
0
votes
1 answer

Quart in combination with NATS.io client

I am trying to run QUART and NATS client in one application. Using this code for nats part [https://github.com/nats-io/stan.py/issues/12#issuecomment-400865266][1] My main function contains: …
0
votes
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 =…
Swatcat
  • 73
  • 6
  • 21
  • 57
0
votes
1 answer

use HTTPS in flask asyncio running

I use flask in windows 10. I want to use HTTPS for the protocol. However, I use flask+asyncio so could not use "ssl=..." method. How could I achieve HTTPS in my case? import hypercorn.asyncio from app import app, client, telegram_handler # must…
Django
  • 1
  • 6
0
votes
1 answer

Quart & websocket: how to send data to selected users only (private message)

I know how to broadcast but i can not target clients. Here is my script: import json import trio from quart import render_template, websocket, render_template_string from quart_trio import QuartTrio from quart_auth import…
laticoda
  • 100
  • 14
0
votes
1 answer

Getting the result of synchronous code in Python Quart

I have an asynchronous route in Quart in which I have to run a block of code that is synchronous. According to the documentation I should use run_sync from quart.utils to ensure that synchronous function does not block the event loop. def…
acG
  • 97
  • 2
  • 6
0
votes
0 answers

discord-oauth and flask (quart) set-cookie failing

I have a quart (basically flask) web-app that is doing OAuth2 with discord. It seems to be working in the cloud, but locally the set-cookie header that appears in the http response after discord authorizes the user is being IGNORED by the…
bravosierra99
  • 1,331
  • 11
  • 23
0
votes
1 answer

Access app_context from custom Converter in Quart

Is there a solution to get the app context in a class that inherit werkzeug BaseConverter class? This is my example running in Flask: from werkzeug.routing import BaseConverter class CodeConverter(BaseConverter): app = None def…
go-pera
  • 31
  • 2
0
votes
1 answer

uWSGI "buffer-size" equivalent in Hypercorn / Quart

Good night, i'm new in Hypercorn / uvloop / Quart and would i have to know which configuration in Hypercorn is equivalent the "buffer-size" from uWSGI? One detail, my application will not use websockets. In some cases will be sent some big…
0
votes
1 answer

not able to run same class with diff job name and group, run at same time

I am working on a quartz scheduler. I have created a class(com.test.job.MyClass) that implements Job MyClass contains some dynamic values which pass in DataMap while scheduling. based on datamap value, i need to invoke the rest API by passing this…
Musaddique S
  • 1,539
  • 2
  • 15
  • 36
0
votes
1 answer

Asynchronous Python server: fire and forget at startup

I am writing a server that must handle asynchronous tasks. I'd rather stick to asyncio for the asynchronous code, so I chose to use Quart[-OpenAPI] framework with Uvicorn. Now, I need to run a task (master.resume() in the code below) when the server…
mckbrd
  • 859
  • 9
  • 11
0
votes
0 answers

How to interact with MongoDB from Python-Quart?

I'm building a small web service and I'm using Python Quart, the async version of Flask. The web services will get data from a MongoDB, run some operations on it and return a JSON. On Flask I would use something like Flask-mongoalchemy. Is there any…
Pau Muñoz
  • 67
  • 1
  • 6
0
votes
1 answer

Python Quart/Hypercorn streamed response causing net::ERR_HTTP2_PROTOCOL_ERROR 200

I have a Quart app with which I stream a response back to the client. I am using asyncio.sleep to delay the response completion, if I set the delay to 59 seconds everythings works fine. The stream completes without any issue. If I increase the time…
blindChicken
  • 352
  • 4
  • 13
0
votes
1 answer

Access app_context from another task in Quart

My Quart app is created with a create_app factory method. I also have a third party library incorporated as an additional task via the create_task method. I pass a callback function to this library which updates my database (via…
Eric
  • 3
  • 4
0
votes
1 answer

ASGI Framework Lifespan error, continuing without Lifespan support

After creating a project with django, and auditing the code via chrome audit, it shows Does not use HTTP/2 for all of its resources 2 requests not served via HTTP/2 to fix this error I followed this…
Avin Mathew
  • 336
  • 11
  • 25