Go to file
Anthony Tuininga 4bc5aa80f0 Repository has migrated from Mercurial to Git. 2017-01-12 11:36:43 -07:00
doc Added support for using the C API for advanced queuing. 2016-03-01 15:34:05 -07:00
samples Added support for using the C API for advanced queuing. 2016-03-01 15:34:05 -07:00
test Added support for initializing a collection upon creation; provided a synonym 2016-02-24 14:16:40 -07:00
.gitattributes Repository has migrated from Mercurial to Git. 2017-01-12 11:36:43 -07:00
.gitignore Repository has migrated from Mercurial to Git. 2017-01-12 11:36:43 -07:00
AQ.c Fix setting of raw values on AQ descriptors. 2016-03-04 10:02:25 -07:00
BUILD.txt Tidy up the README.txt and BUILD.txt (remove some old notes which are no longer 2015-03-11 20:40:26 -06:00
BooleanVar.c Added support for PL/SQL collections of booleans (available only in 12.1). 2016-02-16 16:32:00 -07:00
Buffer.c Remove "unicode" mode and simply permit unicode to be used everywhere within 2011-02-19 03:50:16 +00:00
Callback.c Remove code specific to strings being 4000 characters now that Oracle 12c has 2014-09-04 22:33:08 -06:00
Connection.c Added support for using the C API for advanced queuing. 2016-03-01 15:34:05 -07:00
Cursor.c Only allow up to 10,000 arguments -- any more than that likely wouldn't work 2016-02-29 09:19:19 -07:00
CursorVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
DateTimeVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
Environment.c Added support for binding objects with sub objects attached to them; ensured 2016-02-11 11:47:46 -07:00
Error.c Correct variable references. 2016-02-05 19:37:51 -07:00
ExternalLobVar.c Fix issue with LOB length handling. 2015-06-15 07:18:49 -06:00
IntervalVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
LobVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
LongVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
MANIFEST.in Remove references to documentation that has been moved to Read the Docs. 2014-05-19 22:28:55 -06:00
NumberVar.c Remove debugging lines. 2016-02-24 12:02:04 -07:00
Object.c Retain the hex address of the object since there may be many objects of the 2016-03-07 09:03:57 -07:00
ObjectType.c Added support for initializing a collection upon creation; provided a synonym 2016-02-24 14:16:40 -07:00
ObjectVar.c Pass the type code associated with the object type, as it might be something 2016-02-22 09:53:35 -07:00
README.txt Update the documentation on implicit results based on feedback. 2016-02-02 07:59:50 -07:00
SessionPool.c Eliminate unnecessary initialization code. 2016-02-08 10:32:11 -07:00
StringVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
Subscription.c Eliminate unnecessary initialization code. 2016-02-08 10:32:11 -07:00
TimestampVar.c Added support for binding objects and setting attributes on objects of numbers, 2016-02-09 14:51:30 -07:00
Transforms.c Fixed support for integers. OCI_TYPECODE_INTEGER is stored as a OCINumber, not 2016-03-07 08:01:24 -07:00
Variable.c Added support for PL/SQL collections of booleans (available only in 12.1). 2016-02-16 16:32:00 -07:00
cx_Oracle.c Added support for using the C API for advanced queuing. 2016-03-01 15:34:05 -07:00
release.py Fix build so that there is no need to specify the python version within the 2012-06-30 23:22:14 -06:00
setup.py Added support for using the C API for advanced queuing. 2016-03-01 15:34:05 -07:00

README.txt

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 number of
additions. The time data type is not supported by Oracle and is therefore not
implemented. The method cursor.nextset() is not implemented either as the DB
API specification assumes an implementation of cursors that does not fit well
with Oracle's implementation of cursors and implicit results. See the method
cursor.getimplicitresults() for more information.

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

For feedback or patches, contact Anthony Tuininga at
anthony.tuininga@gmail.com. For help or to ask questions, please use the
mailing list at http://lists.sourceforge.net/lists/listinfo/cx-oracle-users.

Please note that an Oracle client (or server) installation is required in order
to use cx_Oracle. If you do not require the tools that come with a full client
installation, it is recommended to install the Instant Client which is far
easier to install.


Binary Install
--------------
Place the file cx_Oracle.pyd or cx_Oracle.so anywhere on your Python path.


Source Install
--------------
This module has been built with Oracle 10g, 11g and 12c on Linux and Windows.
Others have reported success with other platforms such as Mac OS X.

For simplified installation use pip

    pip install cx_Oracle

Otherwise, you can use the provided setup.py to build and install the module

    python setup.py build
    python setup.py install

See BUILD.txt for additional information.


Usage Example
-------------

import cx_Oracle

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

cursor = connection.cursor()
cursor.execute("""
        select Col1, Col2, Col3
        from SomeTable
        where Col4 = :arg_1
          and Col5 between :arg_2 and :arg_3""",
        arg_1 = "VALUE",
        arg_2 = 5,
        arg_3 = 15)
for column_1, column_2, column_3 in cursor:
    print "Values:", column_1, column_2, column_3


For more examples, please see the test suite in the test directory and the
samples in the samples directory. You can also look at the scripts in the
cx_OracleTools (http://cx-oracletools.sourceforge.net) and the modules in the
cx_PyOracleLib (http://cx-pyoraclelib.sourceforge.net) projects.

For further information see

http://cx_oracle.readthedocs.org