I want to create a website to aid a troubleshooting process.
I have several python scripts that perform different commands as a help in different troubleshooting-processes. Ie a script to check via SSH if a port on a switch is up or where a certain MAC-address is connected in a network.
The scripts are all dependent on input like “check if port 24 on switch1 is linking” is done by running $python portcheck.py switch1-24 and it prints a result “port 24 on switch1 is linking correctly” or “port 24 is not linking, light values from SFP are bad” etc.
Now i want to take this a step further and create a website with a text-input, button and text-output, the reason is that less tech-savvy persons are meant to use it and I dont want them to wreak havoc in a CLI-enviroment.
Is this possible to accomplish? I have experience programming in python but very limited experience in website-making so i really dont know where to start looking for this.
I have googled around and found some options like NiceGUI but cant seem to make it work.
Am I missing something obvious?
In the case of nicegui for example i just cant wrap my head around how to pass an argument from a input-box to run a script locally.
I’m not looking for someone to code it for me but would appreciate a pointer to some resource or better yet a tutorial to follow.
Tomsch112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.