announce: OraPIG, python wrappers for Oracle

From: <>
Date: Tue, 27 May 2008 08:00:36 GMT
Message-ID: <EcP_j.2664$>

I'm pleased to announce the initial release of OraPIG, the Oracle Python Interface Generator.

OraPIG generates Python wrapper classes for Oracle packages.

If you use Oracle and Python, this might be a pretty useful package for you. Download it and let us know what you think!

(and special thanks to everyone that helped me out with all of my tedious data dictionary queries a while back, I hope this package shows it wasn't a total waste of your time!)


Download and docs:

Quick Example: Suppose you have a package called tiny with a single procedure p:

     create or replace package tiny
         procedure p(x in number);
     end tiny;

OraPIG will generate a wrapper class that will allow you to use the package without having to use the various database calls. Instead, the wrapper class will be instantiated and called just like any other Python class:

     class Tiny:
         def __init__(self,curs):  # instantiate class with a cursor

def p(self,x): # call procedure p(x)

Here's how it's used:

     import cx_Oracle
     import tiny
     conn = cx_Oracle.connect('scott/tiger')
     curs = conn.cursor()

     mytiny = tiny.Tiny(curs)
     mytiny.p(2)           # call a procedure
     curs.commit()         # not done automatically

Mark Harrison
Pixar Animation Studios
Received on Tue May 27 2008 - 03:00:36 CDT

Original text of this message