Open Source Python/Oracle Utility - cx_Oracle

cx_Oracle is a Python extension module that allows access to Oracle and 
conforms to the Python database API 2.0 specifications with a few exceptions.

See http://www.python.org/topics/database/DatabaseAPI-2.0.html for more
information on the Python database API specification.


BINARY INSTALL:
Place the file cx_Oracle.pyd anywhere on your Python path.


SOURCE INSTALL:
This module has been built with all versions of Oracle8i at one point, but 
currently is built against Oracle 8.1.7. It builds without difficulty on Linux, 
Solaris, Win32 and Tru64 Unix. It will likely build on other platforms as well, 
but I haven't tried them. Use the provided setup.py to build and install the 
module which makes use of the DistUtils module made available in Python 2.0
and up.


USAGE EXAMPLE:

import cx_Oracle

# connect via SQL*Net string or by each segment in a separate argument
v_Connection = cx_Oracle.connect("user/password@TNS")
v_Connection = cx_Oracle.connect("user", "password", "TNS")

v_Cursor = v_Connection.cursor()
v_Cursor.arraysize = 50
v_Cursor.execute("""
    select Col1, Col2, Col3
    from SomeTable
    where Col4 = :p_Arg_1
      and Col5 between :p_Arg_2 and :p_Arg_3""",
    p_Arg_1 = "VALUE",
    p_Arg_2 = 5,
    p_Arg_3 = 15)
for v_Col_1, v_Col_2, v_Col_3 in v_Cursor.fetchall():
  print "Values:", v_Col_1, v_Col_2, v_Col_3


EXCEPTIONS:
A couple of exceptions to the API specification as these reference features
that I have never used or represent difficulties with the API specification:

1) The cursor method nextset()
   Not supported by Oracle.

2) The constructor Binary()
   Not implemented. Simply pass a string where a binary value is required and
   use setinputsizes(p_Value = cx_Oracle.BINARY) or setinputsizes(p_Value =
   cx_Oracle.LONG_BINARY) to indicate that a binary value is being passed.

3) Binding arrays to PL/SQL
   Supported. Use a Python list for binding in. Use the argument
   [cx_Oracle.<DataType>, <NumElems>] to the cursor function setinputsizes()
   or pass an array of elements of the desired type and length equal to the
   number of elements expected for binding out.

For comments, contact Anthony Tuininga at anthony@computronix.com
