Python-CGI-WebApp is a simple web application that uses Python 3 scripts to generate dynamic webpages.
A CGI (Common Gateway Interface) enabled HTTP server (written in Python 3) handles these requests.
The Common Gateway Interface offers a standard protocol for web servers to execute programs that execute like Console applications running on a server that generates web pages dynamically.

There are three Python Scripts that work together to generate the HTML webpage
generate.py
The Home Page has a link to this python script to start the Web Application. The script imports "keyreader.py" and "template_engine.py" modules and makes function calls to generate the webpage.
keyreader.py
This Python script has a function called "getkey(loc)" that takes the location of a text file as argument. The text file contains a PUBLIC KEY. The function reads the entire content and splits them at 'n' to create a list. Each item in the list is then converted to an HTML line and printed.
template_engine.py
This script is completely responsible for generating the entire webpage. It has several function that generate the required HTML code. To make sure that printed strings are interpreted as HTML code by the browser a function specifies the CGI Content.
Content type: text/html nn
This WebApp requires Python3. Get Python3 from here
https://www.python.org/
Clone the project from here
https://github.com/shashank9830/Python-CGI-WebApp
$ cd webappStart the HTTP Server with following command
$ python simple_httpd.pyYou should see the following output on terminal

This means the server is ready to take requests
DON'T CLOSE THIS TERMINAL
You should see the following output on terminal




To stop the web server simply close the terminal or press [Ctrl + C] in the terminal
This project is licensed under the MIT License - see the LICENSE.md file for details