469,590 Members | 1,996 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

announce: OraPIG (python wrappers for Oracle)

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

--
Mark Harrison
Pixar Animation Studios
Jun 27 '08 #1
0 815

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Roy Smith | last post: by
68 posts views Thread by Lad | last post: by
53 posts views Thread by Stelios Xanthakis | last post: by
217 posts views Thread by gyromagnetic | last post: by
4 posts views Thread by hot.favorite | last post: by
2 posts views Thread by GinTon | last post: by
59 posts views Thread by Kevin Walzer | last post: by
reply views Thread by Robin Dunn | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.