Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best technology for connecting from linux to MS SQL Server using python? ODBC?

Tags:

python

By best, I mean most-common, easiest to setup, free. Performance doesn't matter.

like image 565
Corey Trager Avatar asked Mar 01 '09 00:03

Corey Trager


People also ask

Which method is used for connecting SQL with Python?

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.

Which package in Python helps in connecting SQL and Python?

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.


2 Answers

I decided that pyodbc was the best fit. Very simple, stable, supported:
http://code.google.com/p/pyodbc/

like image 106
Corey Trager Avatar answered Oct 04 '22 03:10

Corey Trager


pymssql, the simple MS SQL Python extension module.

like image 40
Bill the Lizard Avatar answered Oct 04 '22 02:10

Bill the Lizard