这是一个支持代码重新加载的简约 python wsgi 开发服务器? [英] which is a minimalistic python wsgi development server with support for code reload?

查看:20
本文介绍了这是一个支持代码重新加载的简约 python wsgi 开发服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知

  1. wsgiref - 无需重新加载代码
  2. CherryPy - 不仅仅是服务器
  3. mod_wsgi - 所有 apache 开销
  4. paste.httpserver - paste 是一个包含其他内容的巨大包
  5. flup - 与粘贴相同,内容太多.
  6. 生成 - 从未使用过它,但看起来足够轻巧.
  7. Tornado - 不是真正的 wsgi + 完整的框架"
  8. Werkzeug - 运行命令

还有其他人吗?你更喜欢哪一个?

any others out there? which one you prefer?

推荐答案

您可能想要查看的是 Werkzeug - 它是一个 WSGI 实用工具包.它包括一个 runserver 函数,该函数接受 wsgiref 服务器并添加自动代码重新加载(您也可以将其配置为在配置文件更改时重新加载)和一个很棒的调试器.

One you might want to look at is Werkzeug - it is a WSGI utility toolkit. It includes a runserver function that takes the wsgiref server and adds automatic code reloading (you can also configure it to reload when configuration files change) and an awesome debugger.

附带说明一下,您对框架的蔑视听起来像是您打算从头开始处理所有 WSGI 的东西,在这种情况下,我建议您使用 Werkzeug 的实用程序函数来处理解析请求和生成响应.这比自己做要有趣得多.(出于对 Guido 的热爱,请不要使用 cgi.FieldStorage!)

On a side note, your disdain for frameworks makes it sound like you're planning to handle all the WSGI stuff from scratch, in which case I would recommend you use Werkzeug's utility functions to handle parsing requests and generating responses. It's a lot more fun than doing it yourself. (And for the love of Guido, PLEASE don't use cgi.FieldStorage!)

这篇关于这是一个支持代码重新加载的简约 python wsgi 开发服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆