跳转到主要内容

另一个WSGI服务器实现。

项目描述

另一个WSGI服务器实现。

用法

用法如下

$ kwsgi hello.py app --reload

选项如下

$ kwsgi --help
Usage: kwsgi [OPTIONS] FILEPATH WSGIAPP

  Example: kwsgi hello.py app -p 5000 --reload

Options:
  -h, --host TEXT               The interface to bind to.
  -p, --port INTEGER            The port to bind to.
  --reload / --no-reload        Enable live reloading
  --daemonize / --no-daemonize  Detaches the server from the controlling
                                terminal and enters the background.
  --interval INTEGER            Interval time to check file changed for
                                reloading
  --validate / --no-validate    Validating your WSGI application complying with
                                PEP3333 compliance.
  --help                        Show this message and exit.

并且您可以从Python脚本中集成kwsgi

from kwsgi import WSGIServer


def application(env, start_response):
    start_response('200 OK', [('Content-type', 'text/plain; charset=utf-8')])
    return [b'Hello World']


if __name__ == '__main__':
    server = WSGIServer(application)
    server.run_forever()

开发路线图

以下是当前计划的主要里程碑

  1. [完成] 添加最小实现(至少可以运行django应用)。

  2. 使用C-扩展、mypy或Rust优化一些重要的性能瓶颈。

  3. 添加绿色线程实现。

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定选择哪一个,请了解有关安装包的更多信息。

源分发

kwsgi-0.0.2.tar.gz (7.0 kB 查看哈希)

上传时间:

构建分发

kwsgi-0.0.2-py3-none-any.whl (7.5 kB 查看哈希)

上传于 Python 3

由以下支持