I developed a small tool using Python/CGI. I'm reading everywhere that CGI is outdated and no longer considered as good practice. So I would like to re-develop my little tool using something more modern/efficient/future-proof than CGI.

Here is basically what the tool consist of: Users are sending data (a big string + some parameters) through a HTML form, and these data are analyzed with a Python/CGI script to look for specific things. The data processing goes this way (but it's not important): a specific program (launch using a python wrapper) run and output some results. Then these results are analyzed one by one, until n results fulfilling some criteria are found. Then the “good” results are outputted as an HTML page. The program may take a few second to run in good cases, and a few minutes in bad cases. It probably could be a little faster if I was better at programming, but not that much. So the user submit his data, and wait for the results to display.

This is quite simple, but I would like to do things in the right way. Do you have any suggestions on what I should use to perform this kind of stuff, using python, instead of simple CGI? There are so many possibilities that I'm a bit lost... I read here that some people were recommended going with Flask. But I would like to be sure that I'm going on the right direction before starting to learn how to use something totally new to me, which will be time consuming. I would also like to be sure that I'm not doing a mistake by trying to use something else (overcomplicated) than CGI.

  • Relevant? stackoverflow.com/questions/10777502/… – Eric S May 29 '19 at 13:59
  • Indeed, that's where I found the Flask suggestion I'm talking about in my post. It looks like it’s appropriate for my needs, but I’m still afraid that something like Flask could be a little "overkill" – Alexandre.S May 29 '19 at 14:36
  • I'm really a novice at this, but I've heard that Flask is great for simple sites so I'd try it out. – Eric S May 29 '19 at 19:14
  • Okay, I think I'll try to learn Flask. I don't have the time to learn it now, but I'll give you a feedback after spending some time on it. Thanks ! – Alexandre.S Jun 3 '19 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.