python 和 MySQL 之间的交互有推荐的方式吗?

发布于 2024-11-07 09:22:45 字数 92 浏览 8 评论 0原文

python 和 MySQL 之间交互的推荐方式是什么?目前我正在使用 MySQLdb,并且我收到了 Oursql 的消息。但我问自己,是否有更合适的方法来管理这个问题。

What is the recommonded way to interact between python and MySQL? Currently I am using MySQLdb and I heared from Oursql. But I asked myself, if there is a more appropriate way to manage this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蹲在坟头点根烟 2024-11-14 09:22:45

MySQLdb 是大多数人在较低级别使用的,但我们的sql 也很有趣。您可以使用更高级别的机制,例如

  • sqlalchemy
  • Django - 注意它带有一个完整的网络框架:)
  • 我相信你可以找到其他的,寻找'python orm'

MySQLdb is what most people use at the lower level, but oursql is interesting too. You can use higher level mechanisms such as

  • sqlalchemy
  • Django - note it comes with a whole web framework :)
  • I'm sure you can find others, look for 'python orm'
乖乖公主 2024-11-14 09:22:45

我个人使用pymysql,但听说很多人使用MySQLdb。两者的行为方式非常相似,并且可以轻松互换。就我个人而言,(作为 python/MySQL QA)我还没有听说过/更不用说使用 OurSQL 了。

话虽如此,这实际上取决于您想要实现的目标。 Python 有大量的连接器和大量的附加功能来完成几乎任何事情; (并且)因此,重要的是要注意始终查看该组件的受欢迎程度以及其更新频率非常重要。

I personally use pymysql, but have heard a lot of people use MySQLdb. Both are very similar in the way they behave, and could easily be interchangeable. Personally, (working as a python/MySQL QA) I've yet to hear of / let alone work with OurSQL.

With that said, it honestly depends what you want to accomplish. Python has a lot of connectors, and a tons of bells and whistles to complete almost anything; (and) As such, it is important to note that it is important to always look at how popular the component is, as well as how frequently it gets updated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文