For hosting a python application as a web applications three services are required:

  1. Web Server
  2. Application Server (WSGI compatible)
  3. Python Web Framework

Web Server: redirects a user-supplied url request to a port

Usually the ICT department is responsible for restarting and logging the web server.

For local testing a web server can be left out. Also for users who can handle ugly urls like http://123.456.789.012:9999, a web server is not required to have connect python functionality to the web.

Application Server: launches a python instance and forwards the url-request to it

An application server launches a certain process that can takes the input to a a certain port to handle it. For different languages there are different application servers.

Python Web Framework: accepts the url request and returns a response

Inside a running python connected to thr web there are several ways to handle the url request. Web Framework exist as small packages or as large packages incl. a database.

Usually the application manager is responsible for restarting and logging the web framework.