python - uWSGI如何调用WSGI应用程序

标签 python wsgi uwsgi

PEP 3333状态:

The server or gateway invokes the application callable once for each request it receives from an HTTP client, that is directed at the application.

接下来是 CGi 脚本如何调用 WSGI 应用程序可调用的示例。

但是如何uWSGI作为一个二进制应用程序,调用用 Python 编写的 WSGI 可调用函数?

它是否有自己的 Python 包装器,可以连接到套接字,然后调用应用程序可调用?

或者使用某种子解释器魔法?

最佳答案

uWSGI 与 libpython 链接,因此它实际上是一个完整的 python 解释器。它在启动时加载代码,然后等待请求。在每次请求时,它都会运行指定的可调用函数。

关于python - uWSGI如何调用WSGI应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16584591/

相关文章:

python - 管道输出 Linux 排序的最佳方式

python - Raspberry Pi 3 属性报错sslerror报错

python - 看似简单的类方法的类型推断错误

python - 从另一个应用程序内部调用 Pyramid 框架应用程序

python - 为什么我有错误 "Address already in use"?

python - 为什么我的交换列表的两个元素的代码出错了?

基于 Python 多处理的 WSGI 网络服务器

python - Python 中小型/中型 Web 应用程序的堆栈建议

nginx - 配置 Nginx 以使用cherrypy 框架

django - 重启时 uWSGI 停机时间