Questions tagged [flask]

Flask is a web application framework for Python.

Flask is a web application framework for Python 2.7 and 3.4+. It has exceptional documentation, a large number of extensions and a friendly community. It is open source and BSD licensed.

36 questions
2
votes
1 answer

is TCP handshake handled by web application flask or web servers like nginx?

if I run a simple flask application in development mode(so web server and web application is the flask library) on port 5000. is there a way to see SYN, SYN-ack, ack requests that are exchanged between client and server? for example, print them? I…
kankan256
  • 123
2
votes
1 answer

Sending HTTP request to another localhost only Docker container?

I am building a new microservice which is a Python Flask app that is fronted by gunicorn and can take and respond to HTTP get requests. It's kinda like a local proxy service to an external API. I run the gunicorn app on port 5000. I want to remap…
2
votes
0 answers

uWSGI: No python application found

When I run my app with the command python sorteerhoed.py && uwsgi --socket 0.0.0.0:5000 --protocol=http -w wsgi:app It runs fine and when I goto the server ip:5000 I get to see my page. But when I try to deamonize the server with systemctl it will…
2
votes
0 answers

google cloud appengine deploy: exited with error [Errno 12] Cannot allocate memory

I am trying to deploy a toy fastai model on google cloud platform. Step #1 - "builder": INFO tar_runtime_package took 23 seconds Step #1 - "builder": INFO starting: gzip_tar_runtime_package Step #1 - "builder": INFO gzip_tar_runtime_package gzip…
Stuart
  • 21
2
votes
1 answer

How to connect to MySQL running on XAMPP through WSL terminal

MySQL is running on XAMPP and working fine. I am trying to connect to it through the Windows Subsystem for Linux running a Flask app using flask-msqldb. But when I run the Flask app and try to make a connection (mysql.connection.cursor()) the…
Theja
  • 141
2
votes
0 answers

serving files with flask and nginx/gunicorn

I have a basic website set up and I am running into some confusion on how to handle serving static files. I noticed the only thing I have to do to serve static files is set up the proxy to gunicorn in the nginx config. location / { proxy_set_header…
1
vote
0 answers

What is the proper way to host multiple websites from the same machine and same ip address?

I have two Flask websites running on an ubuntu machine running on my home server. Both of them are running as a service with Gunicorn, one is on port 9000, the other is on 9001. I have registered a Cloudflare account, where I created a Zero Trust…
Daniel
  • 11
1
vote
2 answers

How are databases stored for I website that I create and host

I am learning web development and I am using python (flask) along with HTML and CSS with bits of JavaScript. I want to know how I can connect a database (MySQL) to my website and where and how it will be stored. I wish to know how I can incorporate…
rishi
  • 113
1
vote
1 answer

Not able to curl to my VM when ssh is working

I'm trying to run a simple flask server on an Ubuntu VM. I can ssh into it,with myuser@123.456.789, but if I execute curl 123.456.789:8000 I get an operation timeout, even though the server is listening: * Serving Flask app "app.py" …
1
vote
1 answer

how to revert the execution policy to restricted after unrestricting

I had changed my execution policy in Windows powershell but would like to change it back to default i.e unrestricted to restricted. Can it be done?
1
vote
0 answers

Apache/Flask: app hangs at certain points

I've got a Flask app served by Apache that hangs at certain points when answering a request from a client. This happens at various points in the code, though it appears to be deterministic when it happens -- say it happens at line n, but when I…
Joko
  • 11
1
vote
1 answer

Mask_RCNN inside a flask server

Hello I'm trying to build a simple api to receive an image and return some inference values. My filesystem is the following: Mask_RCNN |-MaskDetector.py |-FireDetector(class) fire_app |-server.py |-saved_img If I open python…
1
vote
0 answers

Can I generate non clustered index for one or more columns using flask- sqlalchemy declarations alone

I am using Flask-sqlalchemy with pyodbc on a remote mssql database, I want to implement full text search, I dont have much control over the database other than seeing that Full text search is enabled.Do I need to ask the owner to create a full text…
1
vote
0 answers

Troubles importing Python modules

please, I need some help with the following. I'm using Windows 10, Python 3.7, VSCode 1.32 and I also have installed the current version of Anaconda (and its package). When I want to import a module from a code written in VSCode, say fileName.py…
Mike
  • 121
1
vote
0 answers

Flask disable JSON response escaping

I am trying to pass a url in a json response for a REST API using flask and when I try to send a url it goes from "https://www.google.com/" to /\ on the slashes. How can I prevent this from happening?
1
2 3