谢谢!
编辑:我不是不惜一切代价都是极简主义者.我正在寻找的是一个简单,通用的解决方案,与语言保持接近(并没有强加设计范例,例如MVC).
解决方法 我顺其自然,我建议使用轻量级框架.首先,Web应用程序会使您的服务器面临安全风险,因此最好使用由或多或少的大型开发人员社区维护的内容(更多的眼球来修复漏洞).
此外,如果您想“保持接近语言”,您需要某种抽象层来以pythonic方式管理http. Python完全是关于高级别[包括电池].
一些框架非常接近python的语法,语义和风格.以webpy为例.我认为这句话说明了webpy背后的许多哲学:
“Django lets you write web apps in Django. turbogears lets you write web apps in turbogears. Web.py lets you write web apps in Python.” — Adam Atlas
在简洁和使用“常规”Python方面的另一个好的候选人是cherrypy.从他们的网站:
总结CherryPy allows developers to build web applications in much the same way they would build any other object-orIEnted Python program. […] Your CherryPy powered web applications are in fact stand-alone Python applications embedding their own multi-threaded web server. You can deploy them anywhere you can run Python applications.
以上是内存溢出为你收集整理的轻量级设置,以纯Python生成网页全部内容,希望文章能够帮你解决轻量级设置,以纯Python生成网页所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)