简体   繁体   中英

Python deployment on webserver with CGI

I have a python script that I want to make accessible through a website with an userinterface.

I was experimenting with Flask, but I'm not sure this is the right tool for what I want to do.

My script takes userdata (.doc/.txt files), does something with it and returns it to the user. I don't want to save anything and I don't think that I need a database for this (is this right?). The file will be temporarily saved on the server and everything will be deleted once the user downloaded the modified file.

My webhosting provider supports Python and only accepts CGI. I read that WSGI is the preferred method to use with Python and that CGI has scaling issues and can only process one request at a time. I'm not sure if I understand this correctly. If several users would upload files at the same time, the server would only accept one request or overwrite previous requests? Or it can do one request per unique IP address/user?

Would CGI be ok for the simple get/process/return task of my python script or should I look into a hosting service that uses WSGI?

I had a look at Heroku and Render to deploy a flask app, but I think I could do that through my webhosting provider I guess.

For anyone interested in this topic,

I decided to deploy my app on render.com, which supports gunicorn (WSGI).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM