美文网首页
Python3 pymysql和mysqlclient的区别

Python3 pymysql和mysqlclient的区别

作者: Mr_K_K | 来源:发表于2019-03-22 19:40 被阅读0次

There are currently a few options for using Python 3 with mysql:

mysql-connector-python

  • Officially supported by Oracle
  • Pure python
  • A little slow
  • Not compatible with MySQLdb

pymysql

  • Pure python
  • Faster than mysql-connector
  • Almost completely compatible with MySQLdb, after calling pymysql.install_as_MySQLdb()

cymysql

  • fork of pymysql with optional C speedups

mysqlclient

  • Django's recommended library.
  • Friendly fork of the original MySQLdb, hopes to merge back some day
  • The fastest implementation, as it is C based.
  • The most compatible with MySQLdb, as it is a fork
  • Debian and Ubuntu use it to provide both python-mysqldb andpython3-mysqldb packages.

相关文章

网友评论

      本文标题:Python3 pymysql和mysqlclient的区别

      本文链接:https://www.haomeiwen.com/subject/qvxdvqtx.html