Questions tagged [quart]
Quart is a microframework for developing web applications using Python's asyncio library.
141
questions
-1
votes
1
answer
28
views
How to run a parallel process with Quart-Trio and Hypercorn?
I have a web site on Quart-Trio and Hypercorn. There is a page /search made with Whoosh. Some search operations can take up to ~6 seconds. In production it would probably interfere with the site ...
0
votes
1
answer
52
views
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 ...
0
votes
0
answers
50
views
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....
0
votes
0
answers
7
views
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 ...
1
vote
0
answers
48
views
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 <module>
web | from ...
0
votes
0
answers
19
views
Changing the AccessLogLevel in hypercorn in a quart application
I am trying to create a new hypercorn_config.py file, but I do not know how to create a config file for the hypercorn, not many great searches for this. I am using the command in the docker file right ...
0
votes
1
answer
30
views
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 ...
1
vote
0
answers
49
views
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 ...
0
votes
1
answer
37
views
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)...
0
votes
1
answer
418
views
Quart error: ImportError: cannot import name 'Headers' from 'h11._headers'
i want to start a dashboard for my nextcord bot
But when i import dashboard to run,it’s raise an error
I tried search on internet for this but look like it’s doesn’t in there :(
Error/Traceback
...
0
votes
1
answer
152
views
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 ...
-2
votes
1
answer
96
views
aiohttp.ClientSession() in Quart
How can I create an aiohttp.ClientSession() once so that I can use it when a request is received? And I'd like to deploy this later with Gunicorn as well.
0
votes
0
answers
49
views
quart cached items lost
I have an asynchronous measurement loop running in the background of my quart app which fills up the flask_caching FileSystemCache with measurement data like this:
i = 0
while True:
data = np.ones(...
0
votes
0
answers
74
views
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 ...
0
votes
1
answer
298
views
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.
...
0
votes
1
answer
80
views
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 ...
0
votes
1
answer
95
views
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 ...
2
votes
2
answers
4k
views
Error: Socket Hang Up with Postman API testing
We have deployed some APIs (few developed using Node.js/Express.js and others using Python Quart). All out our APIs are deployed using the Azure containerized instance. We have set-up periodic API ...
-1
votes
1
answer
112
views
Importing a Flask extension in Quart using Blueprints
I am currently building a basic application in which I am carrying out measurements with a sensor connected to the hosting Raspberry Pi. To do so, I have decided to go for Quart, as it allows me to ...
0
votes
0
answers
43
views
AttributeError: 'Permissions' object has no attribute 'administrator' quart_discord
In my code, I am trying to get all the user servers that I have administrator permissions on and then display them on the web page. I use quart_discord for this
Code:
@app.route("/guilds/")
@...
0
votes
0
answers
56
views
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 ...
1
vote
0
answers
199
views
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 ...
0
votes
0
answers
51
views
Spring boot Quartz - trigger end date
I have spring boot application and i'm using quartz to manage jobs.
I created a cron trigger with timezone and end date.
Does the cron execute on end date?
How the timezone influence the end date?
...
1
vote
1
answer
90
views
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 ...
1
vote
1
answer
145
views
Quart framework WARNING:asyncio:Executing
We are using Quart (Flask+asyncio) Python web framework. Every time the request is processed and the response is sent to a client, this (or similar) message is logged:
WARNING:asyncio:Executing <...
0
votes
1
answer
65
views
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):
<...
0
votes
0
answers
42
views
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 ...
1
vote
1
answer
189
views
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 ...
0
votes
1
answer
45
views
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 ...
0
votes
0
answers
94
views
How to stream return large JSON list in Quart Python REST API?
Suppose I have an async REST API in Python/Quart which is expected to return a large list of objects from the database. Without further work, the benefit of async operations fetching rows is not fully ...
0
votes
1
answer
228
views
Scheduling periodic function call in Quart/asyncio
I need to schedule a periodic function call in python (ie. called every minute), without blocking the event loop (I'm using Quart framework with asyncio).
Essentially need to submit work onto the ...
3
votes
1
answer
649
views
Cleaner Dockerfile for continuumio/miniconda3 environment?
I have a Python3.9 / Quart / Hypercorn microservice which runs in a conda environment configured with an environment.yml file. The base image is continuumio/miniconda3.
It took a lot of hacks to get ...
0
votes
1
answer
112
views
Quart, chat server example
I am trying to make a quart application using multiple websockets at the same time:
<script type="text/javascript">
let socket = new WebSocket('ws://localhost:5000/mensagens/{{...
1
vote
0
answers
41
views
Running Quart on Cloudlinux's Passenger
I would like to use Quart on my LiteSpeed server which supports "Python Selector".
I was able to deploy Flask but when I tried to do the same with Quart, it failed. I'm sure it is because ...
0
votes
1
answer
138
views
Telethon, global variable stops websocket
So, I am trying to use telethon,quart and websockets to create a dynamic page that only receives updates when the client receives a message event:
from telethon import TelegramClient, connection, ...
0
votes
0
answers
57
views
How to get variable in Quart
I have this Python code
@app.route("/<page>", methods=['GET', 'POST'])
async def links(page):
links = sql.get_all_links()
all_links = []
for link in links:
for x in ...
1
vote
0
answers
387
views
Asyncio coroutine handling
I've created a text game in Python which interacts using WebSockets, through Quart. So the server file looks like this:
import asyncio
from quart import Quart, render_template, websocket
import Rpg
...
1
vote
0
answers
120
views
How to start Quart Telethon example project?
I am trying to use Quart with telethon.
https://github.com/LonamiWebs/Telethon/blob/master/telethon_examples/quart_login.py
This is the example app that I am trying to build.
At first, I was using ...
0
votes
0
answers
53
views
Quart-auth only works on localhost
I have followed the official readme to run quart-auth. However, it only works on localhost, when I connect using other IP address, such as 192.168.10.7, it simply returns unauthorized exception. I am ...
0
votes
1
answer
2k
views
Quart got an unexpected keyword argument 'loop' when run from bot.loop.create_task
I am trying to add a web ui to a discord bot using Quart. From what I've seen the appropriate way to do this is to from a instance of discord.Bot create a task and to run it. I'm currently doing it ...
0
votes
0
answers
83
views
Making URL request arguments global variables in Python Quart server
I have been developing a Quart server in python which has many endpoints that each use similar variables parsed from the URL query. I'm looking for options to define these globally a single time, ...
0
votes
1
answer
194
views
Python3 Quart register_blueprint of python-healthz throws exception
I use flask and trying to migrate to quart in order to benefit from HTTP/2. I use flask-healthz for kubernetes readiness and liveness health checks. Is there any quart equivalent of flask-healthz?
I ...
0
votes
0
answers
102
views
using pythonanywhere to host a quart web app
I'm trying to host my quart (aync flask) webapp on python anywhere. But whenever I run the site, I get this error:
2021-08-22 14:42:05,914: Error running WSGI application
2021-08-22 14:42:05,915: ...
0
votes
1
answer
207
views
Running coroutines concurrently to a web server
I want to run a quart server alongside other coroutines. However, it seems that the server is blocking the event loop. The server responds to the requests, but neither the timing routine nor the queue ...
0
votes
1
answer
178
views
Quart/Flask render_template return compact json
I'm using Quart (which essentially Flask for HTTP/2) to serve some JSON content. The JSON content resides in the templates/ directory in a pretty-print format, e.g.
example.json
{
"key1": ...
1
vote
0
answers
66
views
Are Python Quart server and JS SocketIO client compatible?
On my current server, I have large blocks of calculations when I receive socketio events. (Server is using Flask + flask-socketio.)
I'm moving the server from local version serving only one user to ...
0
votes
0
answers
132
views
Passing application context in Quart with Celery
I want to pass the application context from Quart to the Celery app. I have tried adapting the synchronous code example provided by Flask into an asynchronous form for Quart.
However, after running ...
0
votes
1
answer
90
views
Unable to access discord bot instance in quart lifecycle
I'm confused with regards to event loops, this might be a common question because it seems like people are using discord.py with quart. I'm trying to integrate discord.py, quart, and celery.
I have a ...
0
votes
0
answers
894
views
How to use inter-process communication (IPC)/websocket in django with discord.py and discord-ext-ipc
I'm currently using discord-ext-ipc as an inter-process communication (IPC) extension for discord.py and linked this with quart-discord. Quart is an asyncio reimplementation of Flask and can natively ...
1
vote
1
answer
264
views
Migrating a Quart project with websockets from asyncio to trio
I'm trying to convert my asyncio project to trio.
I understand that I have to use memory channels instead of Queues but for some reason I don't have the result I'm expecting.
My main problem is that ...