FastCGI WSGI library in Python 3?

前端 未结 5 854
傲寒
傲寒 2021-02-19 01:52

Does there exist any library that can serve a WSGI application as a FastCGI server, for Python 3? (So that nginx could then proxy requests to it?)

The Python 3 docs ment

5条回答
  •  有刺的猬
    2021-02-19 02:33

    I am aware of two options

    • CherryPy - instructions for CherryPy from Digital Ocean
    • uWSGI - instructions for uWSGI from Digital Ocean

    Both support Python 3 and both can create WSGI workers based on other web app code and can be served to NGINX.

    As Graham Dumpleton mentioned, CherryPy talks to NGINX via HTTP protocol, while uWSGI talks the 'uwsgi' protocol to nginx instead of the HTTP protocol, although it does also support using HTTP as well. On the application side, both support hosting Python web applications via the WSGI API.

提交回复
热议问题