Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL-db lib for Python 3.x?

So, looking for a mysql-db-lib that is compatible with py3k/py3.0/py3000, any ideas? Google turned up nothing.

like image 780
thr Avatar asked Dec 21 '08 13:12

thr


People also ask

How do I install MySQL on Python 3?

The easiest way to probably install and use MySQL in Python is to open up your command prompt. Once the command prompt is opened, then specify the full path to the Scripts folder of the Python package. Once you have this full path specified to the Scripts folder, then type in, pip install pymysql.

Does MySQL support Python 3?

Python has an in-built support for SQLite. In this section, we would learn all the concepts using MySQL. MySQLdb module, a popular interface with MySQL is not compatible with Python 3.

Which is the library needed to work with MySQL in Python?

MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2. 0 (PEP 249). It is written in pure Python and does not have any dependencies except for the Python Standard Library.

Is MySQL Connector a library in Python?

MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is compliant with the Python Database API Specification v2. 0 (PEP 249). For notes detailing the changes in each release of Connector/Python, see MySQL Connector/Python Release Notes.


2 Answers

It appears the MySQLdb is pretty much a dead project. However, PyMySQL is a dbapi compliant, pure-python implementation of a mysql client, and it has python 3 support.

EDIT: There's also MySQL Connector/Python. Same idea.

like image 110
itsadok Avatar answered Sep 21 '22 20:09

itsadok


I was looking for it too, but also found nothing, so I ported MySQL-python-1.2.3 to py3k you can read it here http://sourceforge.net/p/mysql-python/discussion/70460/thread/61e3a3c9/

like image 30
davispuh Avatar answered Sep 23 '22 20:09

davispuh