一些背景知识
Paste Deployment is a system for finding and configuring WSGI applicationsand servers. For WSGI application consumers it provides a single, simplefunction (loadapp) for loading a WSGI application from a configurationfile or a Python Egg. For WSGI application providers it only asks for a single,simple entry point to your application, so that application users don’t need tobe exposed to the implementation details of your application
WSGI is the Web Server Gateway Interface. It is a specification for web servers and applicationservers to communicate with web applications (though it can also be used for more than that). It is a Python standard, described in detail inPEP 333
What WSGI¹ is not: a server, a python module, a framework, an API or any kind of software. What it is: an interface specification by which server and application communicate. Both server and application interface sides are specified. It does not exist anywhere else other than as words in the PEP3333. If an application (or framework or toolkit) is written to the WSGI spec then it will run on any server written to that spec.
WSGI applications (meaning WSGI compliant) can be stacked. Those in the middle of the stack are called middlewareand must implement both sides of the WSGI interface,application and server. For the application in top of it it will behave as aserver and for the application (or server) bellow as an application.
A WSGI server (meaning WSGI compliant) only receives the request from the client, passit to the application and then send the response provided by the application tothe client. It does nothing else. All the gory details must be supplied by theapplication or middleware.
=>我的理解是,wsgi是一个 服务器与应用程序通信的接口标准(interface specification)所谓的WSGI application 和 WSGI server 是指符合 WSGI标准的 application 和 server