I’m getting familiar with socket io using Flask-Socketio library. I would like to create some kind of chat app/message board. You can create rooms, join rooms and chat with other people in that room. In order to join an existing room, I would like to get a list of all existing rooms on the server side. So the user can
Tag: flask
terminal error: flask run zsh: command not found: flask
I’m using a Mac , the python version is 2.7.10. and I installed flask I try to follow the tutorial of flash on http://flask.pocoo.org/docs/1.0/ the commands: code in flaskblog.py: The error is command not found: flask I also tried an other tutorial. commands: code in one.py the condition __name__ == ‘__name__’: did not pass. I guess the python venv matters.
imaplib “command SELECT illegal in state NONAUTH” error
I’m attempting to create an application to retrieve and analyse emails sent through gmail. I’m using an alteration on the tutorial found here; http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ readmail.py When I run this code through the command line the output is as expected, however when ran through a basic flask import the entire thing falls apart. app.py The error I receive is; I’ve made
URL for IBM Cloud Kubernetes deployment
This is a bit of a beginner’s question. I’m attempting to get a simple Hello World Python flask application deployed in a kubernetes cluster on IBM Cloud. The application (main.py): I build my Docker image with docker build –rm -t kube-hw . and Dockerfile: I run it locally with docker run –rm -p 5000:5000 kube-hw. That works fine. I can
Is it possible to send HTTP requests from inside a running Docker container
I have a basic distributed system that calculates the average cyclomatic complexity across all commits of a Github repo. It consists of a Master node running on Flask that gives SHA ID’s to a set of Worker nodes when they send a GET request to the Master. I was trying to get some practice with Docker, and wanted to put
How to get current user when implementing Python Flask-Security?
I am using Flask-Security to set up user authentication for my app but I am struggling with getting the email address or ID of the currently logged in user so I can query a table with that particular users details. I’ve just using the standard code. Another question here suggested the following but it didn’t work: Standard code: Answer You
Flask url_for – incorrect static folder path
I’m trying to add an image to my quiz.html page with Flask using: When I look at the page source, it’s interpreted as: http://127.0.0.1:5000/quiz/static/img/question-mark.png rather than: http://127.0.0.1:5000/static/img/question-mark.png Yet, my .css files and .js files load in quiz.html using the same syntax just fine. How can I get the correct static file path? My current structure is: app.py Answer You don’t
generating drop down list of users in database using wtforms and sqlalchemy
I am trying to generate a drop down list of all the users in my database so I can assign admins later that can edit their information. I keep getting the following error from my template: views.py forms.py models.py mobility_add_users.html More of the error readback I’m still new to this so please go easy on me. Answer Hope this helps.
(flask + socket.IO) Result of emit callback is the response of my REST endpoint
Just to give a context here, I’m a node.JS developer, but I’m on a project that I need to work with Python using Flask framework. The problem is, when a client request to an endpoint of my rest flask app, I need to emit an event using socket.IO, and get some data from the socket server, then this data is
Why are my gunicorn Python/Flask workers exiting from signal term?
I have a Python/Flask web application that I am deploying via Gunicorn in a docker image on Amazon ECS. Everything is going fine, and then suddenly, including the last successful request, I see this in the logs: [2017-03-29 21:49:42 +0000] [14] [DEBUG] GET /heatmap_column/e4c53623-2758-4863-af06-91bd002e0107/ADA [2017-03-29 21:49:43 +0000] [1] [INFO] Handling signal: term [2017-03-29 21:49:43 +0000] [14] [INFO] Worker exiting (pid: