announce: OraPIG (python wrappers for Oracle)

M

mh

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!

Cheers,
Mark

Download and docs: http://code.google.com/p/orapig

----------------

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

create or replace package tiny
as
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top