介绍
Gunicorn,Green Unicorn,“绿色独角兽”,是一个被广泛使用的高性能的Python WSGI UNIX HTTP服务器,移植自Ruby的独角兽(Unicorn )项目,使用pre-fork worker模式,具有使用非常简单,轻量级的资源消耗,以及高性能等特点。
Gunicorn 服务器作为 wsgi app的容器,能够与各种Web框架兼容(flask,django等),得益于gevent等技术,使用Gunicorn能够在基本不改变wsgi app代码的前提下,大幅度提高wsgi app的性能。
只能运行在 linux、unix中,不能运行在 windows
一句话解释
学过 JSP 的小伙伴,可以理解为相当于 Tomcat 服务器
安装
pip install gunicorn
安装 gevent
安装 gevent 协程库,Gunicorn使用该协程库
pip install gevent
使用
https://blog.csdn.net/sitebus/article/details/104849817
感谢:
https://blog.csdn.net/sitebus/article/details/104849817