python mysql库对比_mysqlclient和PyMySQL对比
環(huán)境:Python 3.5+, Django 1.9+
最初用django時,搜索時發(fā)現(xiàn)PyMySQL的文章很多,然而在django的官方文檔中python3版的mysql客戶端驅動確沒有提到PyMySQL,只提到了mysqlclient,再細看下去發(fā)現(xiàn):
1. 兩個庫的作者是同一個人INADA Naoki, pip庫郵箱都指向mailto:songofacandy@gmail.com
mysqlclient-python is much faster than PyMySQL.
When to use PyMySQL is:
You can't use libmysqlclient for some reason
You want to use monkeypatched socket of gevent or eventlet
You wan't to hack mysql protocol
3. Django1.9.12官方文檔中:
Django requires mysqlclient 1.3.3 or later. Note that Python 3.2 is not supported. Except for the Python 3.3+ support,
mysqlclient should mostly behave the same as MySQLDB.
4. https://python.libhunt.com/project/mysqlclient-python/vs/pymysql? 兩者基本面的對比
經上對比,準備先用mysqlclient!
總結
以上是生活随笔為你收集整理的python mysql库对比_mysqlclient和PyMySQL对比的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 酱油和gbt酱油哪个好_酱油不是越贵越好
- 下一篇: 网络ip功放连接图_精耕新基建:智能IP