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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

How to Run Python in Production

34 点作者 ashishb24 天前

7 条评论

its-summertime22 天前
&quot;Consider using an unstable package manager&quot; is a really really rough start.<p>additional: &quot;However, writing your own code that involves async functions&quot;, your code <i>does</i> use async functions, its just monkey patched into your program because you used green threads instead.
评论 #43749103 未加载
评论 #43780623 未加载
Hackbraten24 天前
Multithreading is not a prerequisite for async in Python. The default task executor runs in a single thread. So using async APIs should be safe as long as you stick to the single-threaded executor.
评论 #43734768 未加载
jb_gericke22 天前
It sounds like the author makes a blanket claim to avoid asynchronous functions, even when using an inherently asynchronous web framework (FastAPI), which would negate any FastAPI asynchronous concurrency gains.
评论 #43749089 未加载
zvr21 天前
On the &quot;formatters&quot; and &quot;linters&quot; front, there is no need to use anything else than ruff, since it incorporates the functionality of all the other tools mentioned.
评论 #43756353 未加载
andrewstuart21 天前
Perhaps better titled as something like “my personal preferences for how I like to run python in production”.<p>Presenting these opinions as truths will get the hackles up of those who have a different opinion.
评论 #43756520 未加载
gnabgib24 天前
But you don&#x27;t recommend it? (33 points, 38 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43297671">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43297671</a>
评论 #43734483 未加载
评论 #43734352 未加载
jb_gericke22 天前
So first off, don’t use Python in prod. Second off, don’t use async because of complexities in multi-threading?<p>A lot of the world runs just find on Python (see Django), async is mature and stable.
评论 #43749055 未加载