关于 WSGI

 一些背景知识

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值