By best, I mean most-common, easiest to setup, free. Performance doesn't matter.
To create a connection between the MySQL database and Python, the connect() method of mysql. connector module is used. We pass the database details like HostName, username, and the password in the method call, and then the method returns the connection object.
sqlite3 , mysql-connector-python , and psycopg2 allow you to connect a Python application to SQLite, MySQL, and PostgreSQL databases, respectively. Now you can: Interact with SQLite, MySQL, or PostgreSQL databases. Use three different Python SQL modules.
I decided that pyodbc was the best fit. Very simple, stable, supported:
http://code.google.com/p/pyodbc/
pymssql, the simple MS SQL Python extension module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With