Here is what I understand thus far.
PHP-FPM and WSGI are layers upon FastCGI?
So would it be right to say that WSGI is Python's FPM?
WSGI is not actually a layer on FastCGI, but a specification for writing Python web applications that is sufficiently generic that it may attach to many web servers or adapters which in turn may speak to many other technologies, including FastCGI. But FastCGI itself, which is a protocol for a web server to connect to a long-running process, need not be involved at all in a WSGI installation—e.g. the mod_wsgi
Apache module, which exposes WSGI to your Python application directly from Apache and does not require you to run a separate long-running process.
WSGI is defined in PEP 333. A simple application, taken from that specification, looks like this:
def simple_app(environ, start_response):
"""Simplest possible application object"""
status = '200 OK'
response_headers = [('Content-type', 'text/plain')]
start_response(status, response_headers)
return ['Hello world!\n']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With