轻量级gevent程序运行程序
GRunner的Python项目详细描述
关于
grunner'gevent runner'是一个用于unix的python gevent服务器。这是一个预叉 受Gunicorn项目启发的工人模型。Grunner服务器只是 实现了,减少了服务器资源的使用,并且速度相当快。
安装
grunner需要python 2.x>;=2.6。
从源安装:
$ python setup.py install
或者来自pypi:
$ easy_install -U grunner
基本用法
安装完grunner之后,您将可以访问三个命令行脚本grunner。
常用参数
- ^{tt2}$ - Specify a server socket to bind. Server sockets can be any of ^{tt3}$, ^{tt4}$. An IP is a valid ^{tt3}$.
- ^{tt6}$ - The number of worker processes. This number should generally be 2 workers per core in the server.
还有其他各种参数,如pidfile、pythonpath、logging等。 您可以看到预期的完整列表:
$ grunner -h
格伦纳
第一个也是最基本的脚本用于服务器“裸”wsgi应用程序 不需要翻译层。基本用法:
$ grunner [OPTIONS] APP_MODULE
其中APP_MODULE是模式$(MODULE_NAME):$(VARIABLE_NAME)。这个 模块名可以是全点路径。变量名引用wsgi 应在指定模块中找到的可调用的。
测试应用程序示例:
$ cd examples $ grunner --workers=2 --bind 0.0.0.0:8000 -d -log=/log/file/path --pythonpath=/project/dir/ test:app
许可证
格兰纳是根据麻省理工学院的许可证被释放的。有关详细信息,请参见许可文件 细节。