Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What python 3 library should I use for MySQL?

As far as I know MySQLdb still isn't ported to Python 3.

There seems to be another library called PyMySQL on pypy but the installation for python 3 looks strange (run a .sh script?). Also there is a library called PyMySQL3 but I can't find info about what it's about.

What's the preferred way to use MySQL with Python 3 these days?

Is there an elegant solution that could be installed with pip or with a python setup.py install command?

like image 672
John Smith Optional Avatar asked Jun 06 '13 15:06

John Smith Optional


1 Answers

I've used the basic mysql-connector from MySQL for a few Python 3 projects, along with SQLAlchemy.

I also tried PyMySQL, but if I remember correctly I had a more difficult time configuring it.

like image 155
Jeremiah Avatar answered Sep 21 '22 01:09

Jeremiah