[Tutor] Python Database Scripting

2012-02-08 Thread Brad Hudson
Can someone provide information on the best modules/python tools to use for
general database scripting? I'm interested in something that works across
the board for Oracle, MySQL, MS SQL Server, and DB2. I was hoping a good
generic ODBC module would be out there, but I'm having difficulty locating
one that works for all.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python Database Scripting

2012-02-08 Thread Modulok
The closest thing you'll find will probably be the third party module
'sqlalchemy'. You can install it via easy_install or pip. If that doesn't meet
your needs I'm not sure what else would. (But would love to hear about it.)

-Modulok-

On 2/8/12, Brad Hudson brad.hud...@gmail.com wrote:
 Can someone provide information on the best modules/python tools to use for
 general database scripting? I'm interested in something that works across
 the board for Oracle, MySQL, MS SQL Server, and DB2. I was hoping a good
 generic ODBC module would be out there, but I'm having difficulty locating
 one that works for all.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python Database Scripting

2012-02-08 Thread Alan Gauld

On 08/02/12 18:03, Brad Hudson wrote:

Can someone provide information on the best modules/python tools to use
for general database scripting? I'm interested in something that works
across the board for Oracle, MySQL, MS SQL Server, and DB2. I was hoping
a good generic ODBC module would be out there, but I'm having difficulty
locating one that works for all.


There are a few object-database wrappers such as SQLAlchemy that has 
been mentioned.


But be aware that any such generic database wrapper will have 
compromises in performance/scalability. Every database has its own 
foibles and if you need power access you will need to use native access. 
The Python DBAPI is pretty standard but it also allows you to access the 
database features too.


There is an ODBC wrapper too but of course ODBC adds yet another layer 
of limitations. Given the choice of using ODBC via Python DBAPI or using 
Sqlalchemy I'd probably go with SqlAlchemy.


Either approach is valid, it just depends on whether 
performance/flexibility or compatibility/transparency matters

most. You have to pick your poison.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python Database Scripting

2012-02-08 Thread Brad Hudson
Thanks for the responses Alan  Modulok. I will start with SQLAlchemy and
see where it takes me.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python Database Scripting

2012-02-08 Thread Timo

Op 08-02-12 20:20, Brad Hudson schreef:
Thanks for the responses Alan  Modulok. I will start with SQLAlchemy 
and see where it takes me.
I was looking for something similar a couple of months ago and chose to 
use SQLObject over SQLAlchemy. In my eyes it was much easier to use.


Timo




___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor