Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL for Python 2.7 [closed]

I'm looking for a tool to use MySQL with Python 2.7 under Windows 7 64 bits.

I searched a little bit a found these :

MySQLdb - _http://sourceforge.net/projects/mysql-python/ 
SQLAlchemy - _http://www.sqlalchemy.org/ 
SQLObject - _http://sqlobject.org/ 
ourSQL - _http://pythonhosted.org/oursql/ 
Connector/Python - _http://dev.mysql.com/downloads/connector/python/1.0.html 
SQLite - _http://www.sqlite.org/ 
Psycopg2 - _http://wiki.postgresql.org/wiki/Psycopg2_Tutorial (postgreSQL)
pandaSQL - _https://github.com/yhat/pandasql 
python-sql - _https://code.google.com/p/python-sql/ 
SnakeSQL - http://pythonweb.org/projects/snakesql/

What do you recommend ?

Thanks !

Antoine

like image 763
Elbbard Avatar asked Dec 15 '22 06:12

Elbbard


2 Answers

Its important to know what you are searching for and the results you pasted:

  • MySQLdb - this is a Python driver for MySQL. This is a requirement to use MySQL with Python.
  • SQLAlchemy - this in an object relational mapper. A library used to define database objects in code. By itself, this library cannot connect to any database.
  • SQLObject - this is an alternate object relational mapper.
  • ourSQL - an alternate database driver for MySQL to be used in Python.
  • Connector/Python - a driver for Python from the developers of MySQL.
  • SQLite - this is a file-based database, and has nothing to do with MySQL. Libraries for sqlite are bundled with Python.
  • Psycopg2 - this is a driver for postgreSQL, a different database.
  • pandaSQL - this has nothing to do with MySQL but is rather a component for the pandas library.
  • python-sql, this library is only for SQL statements and nothing to do with MySQL.
  • SnakeSQL - this is a database written in Python.

Of what you have searched, the recommended library is MySQLdb.

like image 54
Burhan Khalid Avatar answered Jan 11 '23 01:01

Burhan Khalid


Try PyMySQL if you want easy installation. It doesn't require any native libraries, its pure python implementation. I wouldn't call it revolutionary or awesome, it just works ;).

like image 28
antonone Avatar answered Jan 11 '23 00:01

antonone