TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Python web programming without a framework?

1 点作者 dynamic99将近 12 年前
I have some experience with Python scripting, but have only created web apps with PHP. I do NOT want to use a framework due to a few problems it may cause. So can I use Python to create web apps without a framework? Is it worth it?

4 条评论

venomsnake将近 12 年前
Okay - as a person that recently made the transition:<p>Flask,Jinja2 + bootstrap + learn python functools.wraps<p>Flask just makes the dispatch and routing. Jinja templates are very close to smarty. You can make a site runing in a second. Also a benefit of using flask is that you have ready WSGI app that you can put on gevent or tornado.<p>If some of your output is prematurely truncated if you are behind HAProxy - check tornado keep alive settings. (not relevant but took me 2 days to figure it out)
cyberpanther将近 12 年前
If you don't want to use a framework then you should use a micro framework like Flask: <a href="http://flask.pocoo.org/" rel="nofollow">http://flask.pocoo.org/</a><p>This is essentially gives you the tools to get started and not much else. You don't want to have to reinvent protocols like Wsgi in order to run fast python code.
评论 #5767987 未加载
taddeimania将近 12 年前
No its not worth it. The frameworks exist because many smart people agree that it isnt smart. Also what problems do you think a framework would cause?
digitalWestie将近 12 年前
Interesting, what problems are you trying to avoid?
评论 #5768021 未加载