Guicor绿色独角兽'是一个PythoWSGIUNIX的HTTP服务器。这是一个pre-forkworker的模型,从Ruby的独角兽(Uicor)项目移植。该Guicor服务器大致与各种Web框架兼容,只需非常简单的执行,轻量级的资源消耗,以及相当迅速。
结构图:
与uWSGI的性能比较:
特点:
本身支持WSGI、Djago、Paster
自动辅助进程管理
简单的Pytho配置
允许配置多个工作环境
各种服务器的可扩展钩子
与Pytho2.x>=2.5,3.x>=3.2兼容
安装:
$ pip istall guicor$ cat myapp.py def app(eviro, start_respose): data = b"Hello, World!\" start_respose("200 OK", [ ("Cotet-Type", "text/plai"), ("Cotet-Legth", str(le(data))) ]) retur iter([data])$ guicor -w 4 myapp:app[2014-09-10 10:22:28 +0000] [30869] [INFO] Listeig at: https://127.0.0.1:8000 (30869)[2014-09-10 10:22:28 +0000] [30869] [INFO] Usig worker: syc[2014-09-10 10:22:28 +0000] [30874] [INFO] Bootig worker with pid: 30874[2014-09-10 10:22:28 +0000] [30875] [INFO] Bootig worker with pid: 30875[2014-09-10 10:22:28 +0000] [30876] [INFO] Bootig worker with pid: 30876[2014-09-10 10:22:28 +0000] [30877] [INFO] Bootig worker with pid: 30877
评论