Python Forum

Full Version: Web Form to Python Script to Text File to zip file to web
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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.