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
0 answers

Can't import py_eureka_client in Quart app

I try to install py_eureka_client module in existing (and working) Quart project. So I did pip install py-eureka-client (virtual environment activated) Then confirm with pip list and can see py-eureka-client 0.11.7 installed. But when I try to…
AlexeiP
  • 581
  • 1
  • 10
  • 26
0
votes
0 answers

Endpoint with multipart: Quart-Schema only shows 'application/x-www-urlencoded' in Swagger

I'm using Quart-Schema and have defined an endpoint for a multipart call with the help of https://pgjones.gitlab.io/quart-schema/how_to_guides/request_validation.html. Looks like this: @dataclass class File: file: Optional[UploadFile] = None …
kasimir
  • 1,506
  • 1
  • 20
  • 26
0
votes
0 answers

Unable to suppress Quart serving logs after Python 3.10 upgrade

I'm moving a Quart webapp from python 3.7 to python 3.10 and I'm suddenly unable to suppress the server logs. Previously the advice from this thread: getLogger('quart.serving').setLevel(ERROR) and that's worked well for at least a year now. The…
0
votes
1 answer

Uvicorn + Quart yielding error 413 on post request

I'm trying to setup a simple http server to receive ( potentially large ) JSON objects. from quart import Quart, request import uvicorn app = Quart(__name__) @app.route( '/' , methods=[ 'POST' ] ) async def hello(): json = await request.json …
0
votes
1 answer

wrapping requests library request in Quart run_sync causes intermittent failures

I'm converting a Flask app to Quart and trying not to change too much, so for now I'm making requests on the server using the requests library, and just wrapping them in run_sync. So I converted: response: Response = session.request( …
kdavh
  • 404
  • 6
  • 13
0
votes
0 answers

How to make a site on Quart work properly?

How to run quart on hosting - there is already a domain . web/public_html/app.py I run the file app => python3.9 app.py Console: ` Okey! Serving Quart app 'app' Environment: production Please use an ASGI server (e.g. Hypercorn) directly in…
TanderOFF
  • 1
  • 1
  • 1
0
votes
1 answer

I am getting an error to await ipc.start() but the documentation doesn't say it

I am creating a web dashboard for my discord bot using quart. I have 2 files, bot.py and webserver.py. The bot.py file has the code for my bot and the webserver.py has the code for the web dashboard. Here is the code of bot.py. import os import…
Araf
  • 27
  • 4
0
votes
1 answer

Python/Quart: how to call client back when the app's background task is done?

I need help with the python web framework, Quart. I want to build a python server that returns 202 as soon as a client requests some time consuming I/O task, and call the client back to return value of that task as soon as the task is done. For…
0
votes
1 answer

Can I make a Quart app do a redirect after a background task finishes?

I am currently building an app with Quart that web scrapes an external site for data. Because this can take several minutes, I made the scraping a background task to avoid request timeouts. After the user provides a user ID to a form on the home…
BarleyZP
  • 3
  • 1
0
votes
0 answers

How to make flask/quart server logs more readable?

We all run to check server logs when we face some errors/discrepancy in the system. I was curious is there any way to beautify and more flask/quart server logs more readable ? ps: from beautify I mean we can use different colours for assertions(eg.…
0
votes
0 answers

Is there a way to make quartel run on Colab at all?

I am trying to run quart on collab but it doesnt seem to work? This is my code (its from here) !pip install quart from quart import Quart app = Quart(__name__) @app.route("/hello") async def hello(): return "Hello, World!" if __name__ ==…
0
votes
1 answer

Python Quart | Wait for create_task() to complete before exit

I have created an application using Quart, it has a background task that performs tasks such as data analysis and writing reports. When I end the application with ctrl-c the background thread is instantly killed, even if it's in the middle of an IO…
Swatcat
  • 73
  • 6
  • 21
  • 57
0
votes
1 answer

Python : Passing parameters by reference down chain

I am trying to pass a variable (MySQL connection class instance) down into a method and then into a class, the issue is that it needs to be done 'by reference' as the main class can change the value. The variable in the final class does not update…
Swatcat
  • 73
  • 6
  • 21
  • 57
0
votes
1 answer

Error with JSONEncoder when start a Python Quart application

When I start Quart without Mongo, every think is fine. But after I start to intergrated Qurat-Moto I have the following error: AttributeError: module 'quart.json' has no attribute 'JSONEncoder' I try several Python interpretor: Poetry with Python…
sebajou
  • 3
  • 2
0
votes
1 answer

Hosting quart app on heroku: receiving an Error R10 (Boot timeout) despite specifying host and port in app.run()

I'm trying to deploy a Quart web app on Heroku, but I'm getting the infamous "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch". My current Procfile: web: hypercorn asgi:app The file to run my Quart app…
BarleyZP
  • 3
  • 1