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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Python ORM Solutions in 2025?

2 点作者 kietay3 个月前
We are currently using SQLAlchemy extensively for Python to PostgreSQL interactions. I have found the experience almost universally terrible, there is very little static type hinting, unexpected API choices and runtime errors.<p>I was expecting there to be a popular, modern, Pydantic like ORM tool for defining well typed DB tables in Python and was very surprised to find that not the case. After spending some time looking into this it seems there are a few very young projects (tortoise, piccolo etc) but no well-known, stable solution.<p>What are folks using for DB interactions in Python and what has your experience been?

1 comment

kolanos3 个月前
SQLAlchemy is still arguably the most featureful and robust ORM in Python (although it is much more than an ORM). It is likely the best default choice unless you&#x27;re already working within a framework that offers its own ORM.<p>SQLAlchemy does support type annotations [0], am curious what issues you&#x27;re running into there?<p>[0]: <a href="https:&#x2F;&#x2F;docs.sqlalchemy.org&#x2F;en&#x2F;20&#x2F;orm&#x2F;extensions&#x2F;mypy.html" rel="nofollow">https:&#x2F;&#x2F;docs.sqlalchemy.org&#x2F;en&#x2F;20&#x2F;orm&#x2F;extensions&#x2F;mypy.html</a>
评论 #43335550 未加载
评论 #43335920 未加载