Source

cx_Oracle /

Filename Size Date modified Message
doc
samples
test
42 B
The .hgignore file should also be converted to native line endings.
89 B
Ignore compiled Python files.
652 B
Added tag 5.1.3 for changeset 179b9747a27e
4.6 KB
Tidy up the README.txt and BUILD.txt (remove some old notes which are no longer
3.0 KB
Remove "unicode" mode and simply permit unicode to be used everywhere within
10.2 KB
Remove code specific to strings being 4000 characters now that Oracle 12c has
64.2 KB
Remove conditional code now that Oracle 10g is the minimum version supported.
82.9 KB
Reorganize the code for handling errors so that the same code can be used for
6.2 KB
Free temporary LOBs prior to each fetch in order to avoid leaking them; thanks
5.6 KB
Free temporary LOBs prior to each fetch in order to avoid leaking them; thanks
11.8 KB
Reorganize the code for handling errors so that the same code can be used for
8.5 KB
Reorganize the code for handling errors so that the same code can be used for
24.5 KB
Added support for LOBs greater than 4 GB in length.
12.1 KB
Remove "unicode" mode and simply permit unicode to be used everywhere within
6.1 KB
Added a test to expose the problem with intervals, and a fix that makes it pass
16.4 KB
Added support for LOBs greater than 4 GB in length.
9.2 KB
Expose the UNICODE, FIXED_UNICODE and LONG_UNICODE types so that in Python 3
111 B
Remove references to documentation that has been moved to Read the Docs.
22.3 KB
Booleans are subclassed to integer so ensure that the boolean is checked first;
23.4 KB
Remove "unicode" mode and simply permit unicode to be used everywhere within
8.6 KB
Free temporary LOBs prior to each fetch in order to avoid leaking them; thanks
2.4 KB
Tidy up the README.txt and BUILD.txt (remove some old notes which are no longer
19.9 KB
Remove remaining remnants of support for Oracle 9i (and notes in documentation
16.7 KB
Remove code specific to strings being 4000 characters now that Oracle 12c has
43.1 KB
Added support for getting array DML row counts (new to Oracle 12c).
6.6 KB
Free temporary LOBs prior to each fetch in order to avoid leaking them; thanks
3.8 KB
Added support for interval day to second in Oracle, represented as Python
53.4 KB
Correct execution of tests with Oracle 11g client.
21.3 KB
Add support for connections as SYSASM
1.9 KB
Fix build so that there is no need to specify the python version within the
14.3 KB
Remove remaining remnants of support for Oracle 9i (and notes in documentation

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 method cursor.nextset() and the time data type are not supported by Oracle and are therefore not implemented.

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