Python Forum
Web Form to Python Script to Text File to zip file to web - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Web Form to Python Script to Text File to zip file to web (/thread-28907.html)



Web Form to Python Script to Text File to zip file to web - wfsteadman - Aug-09-2020

Greetings folks,
I might be over thinking my question but let me ask it and get feedback from experts.

I want to have a web form that has multiple fields (devicename, redundant, sharedIP, indaIP, indbIP) and I want to pass those variables to a python script that will then run and create some text files that I will use for other things and then I will have the text files added to a zipped file and then return an html page to the user with a link to the zip file. What I am trying to do is create files that engineers can use to configure some devices.

So engineer would put the information in the browser and then they would get a zipped file with multiple text files that they will use to configure a device (standalone) or a pair of devices (High Availability)

Do I use Flask, or CGO or what? I have done this with perl in the past, but can't wrap my head around how to do this all with python.
Any help would be appreciated.

Thanks
Wally


RE: Web Form to Python Script to Text File to zip file to web - snippsat - Aug-09-2020

(Aug-09-2020, 11:24 AM)wfsteadman Wrote: Do I use Flask, or CGO or what?
Flask is fine for this,it should be a quite manageable/simple task to do.
The obstacle here can be more that you new to this in Python/Flask.
Look at some tutorial eg this match the task pretty good,if just change some stuff.