Apache2:mod_wsgi 或 mod_python,哪个更好? [英] Apache2: mod_wsgi or mod_python, which one is better?

查看:26
本文介绍了Apache2:mod_wsgi 或 mod_python,哪个更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算用 python 编写 Web 服务.但是,我发现 wsgi 也做了类似的事情.可以优先选择哪一个?

I am planning to write web service in python. But, I found wsgi also does the similar thing. Which one can be preferred?

谢谢
巴拉

更新

我还是一头雾水.请帮忙.

I am still confused. Please help.

在我看来更好意味着:
1.会定期修复Bug.
2. 被大多数开发者选择.
3. 附加功能,如 AWS 等身份验证令牌,可以开箱即用.
4. 对版本没有很强的依赖性.(我看到wsgi需要python 2.6)
5. 所有 python 库都可以开箱即用.
6. 未来可扩展.
7. 未来升级不会造成任何问题.

Better in my sense means:
1. Bug will be fixed periodically.
2. Chosen by most developers.
3. Additional features like authentication tokens like AWS, can be supported out of the box.
4. No strong dependency on version.( I see that wsgi requires python 2.6)
5. All python libraries will work out of the box.
6. Scalable in the future.
7. Future upgrade don't cause any issues.

以我有限的经验,我想要这些功能.可能有一些我可能会遗漏.

With my limited experience, I want these features. There might be some I might be missing.

谢谢
巴拉

更新

对于造成的所有混乱,我深表歉意.我只想用python语言公开一个宁静的网络服务.有没有好的框架?

I am sorry for all the confusion caused. I just want to expose a restful web services in python language. Is there a good framework?

推荐答案

mod_wsgi 得到更积极的维护,并且(我听说——我自己没有对它们进行基准测试!)比 mod_python 的性能更好.因此,除非您需要 mod_python 的专有功能,否则只需使用 Web 应用程序框架(或非框架,例如 werkzeug;-),使用 mod_wsgi 可能会更好!(现在,几乎所有 Python 网络框架,以及我最喜欢 werkzeug 的许多非框架,都支持 WSGI 作为其网络服务器的标准接口).

mod_wsgi is more actively maintained and (I hear -- haven't benchmarked them myself!) better performing than mod_python. So unless you need exclusive features of mod_python, just to use a web app framework (or non-framework, like werkzeug;-), you're probably better off with mod_wsgi! (Just about every Python web framework, and many non-frameworks of which werkzeug is my favorite, support WSGI as their standard interface to the web server, these days).

这篇关于Apache2:mod_wsgi 或 mod_python,哪个更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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