Category "flask"

How to run a flask application?

I want to know the correct way to start a flask application. The docs show two different commands: $ flask -a sample run and $ python3.4 sample.py produ

Kubernetes Istio Gateway & VirtualService Config Flask Example

I try to get some hands on experience with K8s & istio. I am using minikube and I try to deploy a dummy flask web-app. However, for some reason I do not man

How to run google people service build in server to make token.pickle

I try to make micro sever to connect google people API. I do in my local host 'MACOS', everything oke. But after i deploy to server 'CENTOS', server can not ren

Flask check_password always return false

I create login for user in home page if user click on login then the login page is display there user enter email id and password if email id and password is co

How to prevent a flask form from being cleared if an input is wrong

I have looked for many solutions for this issue but I have not found one specific to Flask, so I have a flask form and I use WTForms to validate the form. The f

Python + Flask + Discord: How to send a message through discord through a flask endpoint?

I'm trying to send a message with discord, activated through a Flask endpoint I get the following error message when I call http://127.0.0.1:5000/send RuntimeEr

Run periodic task defined from the view | Flask & Celery

I'm trying to run a simple periodic task every 10 seconds using flask and celery with the following code in my controllers.py: @celery.task() def print_hello(wo

Facebook login to post in my database and link user to backend

I have a web app with Python and Flask that takes user input and stores it in a database, then I populate all the data in an HTML file. However, I want the user

Call function with a click of a button flask

Im very new to flask and im trying to convert a python tkinter gui app to web. As you can understand i have all the functions made so it would be great if a cou

Which Timed JSONWebSignature Serializer replacement for itsdangerous is better? pyjwt or authlib

Currently I was using itsdangerous to generate timed json web signature as a token for users to auth and resetpassword etc. Here's the code: from itsdangerous i

catch git output from flask

I'm trying to roll out a quickie flask app to get git statistics from a certain repo for coworkers to see. import os, sys from flask import Flask, Response ap

ReactJs Socket Client doesn't receive data from Flask Socket using emit(... , to=room)

I'm trying to develop a real-time chess app with Flask socket-io and ReactJs. My problem is that when setting emit(..., broadcast=True) on the server-side, the

Is it possible to redirect inside a middleware class?

class Middleware: def __init__(self, app): self.app = app def __call__(self, environ, start_response): request = Request(environ)

Flask routing multiple optional parameters using url_for()

I know there are similar questions on this but they don't seem to fit my case outlined below: I use one optional parameter in many of my routes like this. @bp.r

Flask app can't load CSS file from static folder

So my file directory looks like this: /templates --base.html /static --/css ----base.css In the of my base.html file I have this line: <link rel="styleshee

Gmail API authentication redirect not working on AWS EC2

I'm trying to run a python script that interacts with the GMail Api on AWS EC2. Said script SHOULD either process the authenticated inbox or ask for authenticat

non-iterable ellipsis in Flask_Restful parser.parse_args()

I've come back to a project I worked on previously, utilising flask RESTful, though whenever I attempt a post request the line args = parser.parse_args() breaks

Flask application displaying list of items from SQL database as text

I am trying to display a list of my items from the database in my flask application. Unfortunately, the list elements are placed into the HTML as text, instead

AttributeError: Could not locate column in row for column '_sa_instance_state' Flask-sqlAlchemy

im developing a new project, im building a small CRM web app using Flask. Im very new using this technology. Im getting this error: AttributeError: Could not lo

How to override flask_admin ModelView.get_list to get custom amount of entries

Now i get all entries in admin when i open page of MyView(ModelView). I want to manage this behaviour and get only, for example, 10 entries. I tried to override