Questions tagged [flask]

Flask is a lightweight framework for developing web applications using Python.

50,931 questions
-1votes
0answers
10views

Got 504 Gateway Time-out while using python multiprocessing pool in flask application

My current API request takes around 40 seconds to return the response; a lot of data processing is involved. I reduced response time inside the local server by 60% using Python multiprocessing. When I ...
0votes
0answers
6views

Flask gRPC betterproto socket.gaierror: [Errno 8] nodename nor servname provided, or not known

I'm creating microservices using gRPC. For generating code from .proto file I'm using betterproto instead of grpcio-tools. When I use Flask as a client app to call functions of server it's giving ...
0votes
0answers
18views

How can I call a javascript function from flask?

Very low experience with python/flask. Working on a popup in a flask html template. On the page I have a form with a few inputs, and on submit it goes to app.py and through an algorithm (I didn't ...
0votes
0answers
12views

404 Not Found using Flask and Ngrok http://127.0.0.1:5000

I'm hosting my link with http://127.0.0.1:5000 on ngrok, but when I put the link that ngrok returns me to the web it gives 404 Not Found. I tried the answers of this same question but i can't fixxed. ...
1vote
0answers
23views

How to run a function in the background of flask app

I have a web application route in flask. The route is supposed to give the user an analysis of their data after 30 minutes. To do this, they initiate the route. This triggers an API request that takes ...
-1votes
0answers
15views

How not to redirect a flask server route to other page?

I have a html form. I am using flask request to get the data from the form when clicked on submit button. Below is the function for helping me get the data. @app.route("/date-food-add", ...
0votes
0answers
16views

GCP Async with Slack

I have a Flaks application that will clone instances so this is a process that will take about 5ish minutes. However, I would like for it to be compatible with slack slash commands. Since slack api ...
-2votes
0answers
42views

Why am i getting Uncaught SyntaxError: missing ) when triggering onclick event with a list of strings

I'm getting Uncaught SyntaxError: missing ) when i trigger onclick event with a list of strings. I am trying to call a JavaScript function, and pass data with jinja2. Here is my code {% for ...
-1votes
0answers
16views

Optimizing __init__ execution time for Python Flask class Object

i am developing a small private project for my company, which enables the user to check for possible shift changes in the future (and taking care of resting time and so on) I extract my data from a ...
0votes
0answers
18views

How to limit results of subquery in SQLAlchemy?

Im having some difficulties to get this query right. The gist of the Query is: for each question, to retrieve the highest guess together with the guess_id. subquery = db.session\ .query(Guess, db....
0votes
0answers
21views

Using Reserved Ngrok Domain with Flask-Ngrok

I have written a simple API using Flask. It works when run on my local machine and when testing using Ngrok. The issue I have is that Ngrok changes the IP each time the API is run. I have a paid Ngrok ...
  • 409
-1votes
0answers
16views

see every database entry in SqlAlchemy

I have the following db model : class Certificate(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(10000)) partner = db.Column(db.String(150)) expire =...
0votes
1answer
18views

REST API: How to provide http request header details

Testing with the postman app I am making a request (GET) to fetch data from the server since the endpoints are authenticated, I'm providing the token value in the headers option. The above request ...
-1votes
0answers
11views

i want to connect multiple MySQL host in python flask

we want to create a separate new project setup with multiple MySQL hosts connection in the python flask framework. need to create a rough flask framework in blueprint API HTTP router to get data from ...
-2votes
0answers
11views

Why request.args.get parameters have two strings and what actually request.args.get returns on attached example

I’m new in python and flask and I'm trying to understand how request.args.get is working. To practise this I'm building a movie library based on https://developers.themoviedb.org/3/movies/get-upcoming....

153050per page