Tha*_*tos 14 python wsgi fastcgi python-3.x
对于Python 3,是否存在可以作为FastCGI服务器为WSGI应用程序提供服务的库?(那么nginx可以代理请求吗?)
Python 3文档提到了flup,但是flup甚至没有安装在Python 3中:
% env3/bin/pip install flup
Downloading/unpacking flup
Downloading flup-1.0.2.tar.gz (49kB): 49kB downloaded
Running setup.py (path:/Users/me/tmp/env3/build/flup/setup.py) egg_info for package flup
Traceback (most recent call last):
File "", line 17, in
File "/Users/me/tmp/env3/build/flup/setup.py", line 2, in
from ez_setup import use_setuptools
File "./ez_setup.py", line 98
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 17, in
File "/Users/me/tmp/env3/build/flup/setup.py", line 2, in
from ez_setup import use_setuptools
File "./ez_setup.py", line 98
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in [snip]
Storing debug log for failure in [snip]
我知道有两个选择
两者都支持 Python 3,并且都可以基于其他 Web 应用程序代码创建 WSGI Worker,并可以提供给 NGINX。
正如 Graham Dumpleton 提到的,CherryPy 通过 HTTP 协议与 NGINX 进行通信,而 uWSGI 则使用“uwsgi”协议与 nginx 进行通信,而不是 HTTP 协议,尽管它也支持使用 HTTP。在应用程序方面,两者都支持通过 WSGI API 托管 Python Web 应用程序。
| 归档时间: |
|
| 查看次数: |
7748 次 |
| 最近记录: |