[CentralOH] Python and Oracle
jonebird at gmail.com
Wed Dec 9 14:13:50 CET 2009
You may want to consider using an ORM package which will abstract a
lot of the particular details around the particular flavor of RDBMS
that you are connecting to. In helping others learn python, I usually
end up introducing them to sqlalchemy (SA) and encourage them to take
the time to learn it. IMO, it's worth climbing the moderate learning
curve it possesses. Also, if you're not a fan of ORMs than you can
still take advantage of the abstractions and consistency SA provides
in it's SQL Expression Language.
Here is a link to their documentation about Oracle support:
But to give a better "start here" link, I'd suggest the basic overview page:
-- Jon Miller
On Tue, Dec 8, 2009 at 10:40 PM, Michael S. Yanovich
<yanovich at cse.ohio-state.edu> wrote:
> I've started a challenge in Python (I may have gotten myself in over my
> head) where I want to create a Python script that would access a *remote*
> Oracle database and provide the contents of a certain entry in the database.
> I've done some research on this and it seems that I would need either
> cx_Oracle or PyODBC.
> For cx_Oracle it looks like I need to have Oracle installed locally to use
> it. However, I have found some useful tutorials on using cx_Oracle that make
> it look easy for what I want to accomplish.
> As for PyODBC I would have to compile it locally and change my PATHs for
> Python to get this to work, but I'm not fully sure on how to go about using
> it to access a database. (It seems more intimidating)
> The server I would like to remotely connect to doesn't have a documented
> API, but it does have a publicly search-able database that anyone can
> connect to and browse. I know it is built on Oracle. I have determined this
> by the error messages and such the system throws at someone. I am assuming
> though that the information I am looking for is in a database.
> The database is:
> It can be access by going to http://buckeyelink.osu.edu/ and scrolling down
> to and clicking on "Course Catalog" under Academics and under Public Access.
> I know something of this nature can be done because a website has
> accomplished this using PHP and maybe something else.
> My question to everyone is: Which route should I go cx_Oracle or PyODBC, or
> am I going about this all wrong? Or is there an easier way?
> CentralOH mailing list
> CentralOH at python.org
More information about the CentralOH