announce: OraPIG (python wrappers for Oracle)

Discussion in 'Python' started by mh@pixar.com, May 27, 2008.

  1. Guest

    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
     
    , May 27, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Rudin

    python com wrappers

    Paul Rudin, Dec 9, 2003, in forum: Python
    Replies:
    3
    Views:
    417
    R.Marquez
    Dec 10, 2003
  2. Etienne Posthumus

    Anyone else using Python OpenSSL Wrappers?

    Etienne Posthumus, Jan 12, 2004, in forum: Python
    Replies:
    0
    Views:
    325
    Etienne Posthumus
    Jan 12, 2004
  3. DreiJane
    Replies:
    0
    Views:
    282
    DreiJane
    Nov 23, 2009
  4. DreiJane
    Replies:
    0
    Views:
    302
    DreiJane
    Nov 23, 2009
  5. Feyruz
    Replies:
    4
    Views:
    2,349
    Sherm Pendley
    Oct 14, 2005
Loading...

Share This Page