1- # Python cx_Oracle interface to Oracle Database
1+ # cx_Oracle version 6.2
22
3- cx_Oracle is a Python extension module that enables access to Oracle Database.
4- It conforms to the [ Python database API 2.0 specification] [ 1 ] with a
5- considerable number of additions and a couple of exclusions.
6-
7- cx_Oracle is licensed under a BSD license which you can find [ here] [ 3 ] .
3+ cx_Oracle is a Python extension module that enables access to Oracle
4+ Database. It conforms to the [ Python database API 2.0
5+ specification] [ 1 ] with a considerable number of additions and a couple
6+ of exclusions. See the
7+ [ homepage] ( https://oracle.github.io/python-cx_Oracle/index.html ) for a
8+ feature list.
89
910cx_Oracle 6 has been tested with Python version 2.7, and with versions
10113.4 and higher. You can use cx_Oracle with Oracle 11.2, 12.1 and 12.2
@@ -13,181 +14,46 @@ interoperability allows connection to both older and newer databases,
1314for example Oracle 12.2 client libraries can connect to Oracle
1415Database 11.2.
1516
16- ## Getting Started
17-
18- Install Python from [ python.org] [ 4 ] .
19-
20- Install cx_Oracle using [ Quick Start cx_Oracle Installation] [ 6 ] .
21-
22- Download cx_Oracle [ samples] [ 12 ] or create a script like the one
23- below.
24-
25- Locate your Oracle Database username and password, and the database
26- connection string. The connection string is commonly of the format
27- ` hostname/servicename ` , using the hostname where the database is
28- running, and the service name of the Oracle Database instance.
29-
30- Substitute your username, password and connection string in the code.
31- For downloaded examples, put these in [ ` SampleEnv.py ` ] [ 13 ] and
32- [ ` SampleEnv.sql ` ] [ 10 ] , and then follow [ ` sample/README ` ] [ 16 ] to create
33- the cx_Oracle sample schema. SQL scripts to create Oracle Database's
34- common sample schemas can be found at
35- [ github.com/oracle/db-sample-schemas] [ 17 ] .
36-
37- Run the Python script, for example:
38-
39- ```
40- python myscript.py
41- ```
42-
43- ### Sample cx_Oracle Script
44-
45- ``` python
46- # myscript.py
47-
48- from __future__ import print_function
49-
50- import cx_Oracle
51-
52- # Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer.
53- connection = cx_Oracle.connect(" hr" , " welcome" , " localhost/orclpdb" )
54-
55- cursor = connection.cursor()
56- cursor.execute("""
57- SELECT first_name, last_name
58- FROM employees
59- WHERE department_id = :did AND employee_id > :eid""" ,
60- did = 50 ,
61- eid = 190 )
62- for fname, lname in cursor:
63- print (" Values:" , fname, lname)
64- ```
65-
6617## Installation
6718
6819See [ cx_Oracle Installation] [ 15 ] .
6920
70- ## Examples
71-
72- See the [ samples] [ 12 ] directory and the [ test suite] [ 11 ] . You can also
73- look at the scripts in [ cx_OracleTools] [ 7 ] and the modules in
74- [ cx_PyOracleLib] [ 8 ] .
75-
7621## Documentation
7722
78- See the [ cx_Oracle Documentation] [ 2 ] .
23+ See the [ cx_Oracle Documentation] [ 2 ] and [ Release Notes ] [ 14 ] .
7924
80- ## Changes
25+ ## Samples
8126
82- See [ What's New] [ 18 ] and the [ Release Notes] [ 14 ] .
83-
84- ## Tests
85-
86- See the [ test suite] [ 11 ] .
27+ See the [ /samples] [ 12 ] directory and the [ tutorial] [ 6 ] . You can also
28+ look at the scripts in [ cx_OracleTools] [ 7 ] and the modules in
29+ [ cx_PyOracleLib] [ 8 ] .
8730
8831## Help
8932
9033Issues and questions can be raised with the cx_Oracle community on
9134[ GitHub] [ 9 ] or on the [ mailing list] [ 5 ] .
9235
93- ## Features
94-
95- - Easily installed from PyPI.
96-
97- - Support for Python 2 and 3.
98-
99- - Support for Oracle Client 11.2, 12.1 and 12.2. Oracle's standard
100- cross-version interoperability, allows easy upgrades and
101- connectivity to different Oracle Database versions.
102-
103- - Connect to Oracle Database 9.2, 10, 11 or 12 (depending on the
104- Oracle Client version used).
105-
106- - SQL and PL/SQL Execution. The underlying Oracle Client libraries
107- have significant optimizations including compressed fetch,
108- pre-fetching, client and server result set caching, and statement
109- caching with auto-tuning.
110-
111- - Full use of Oracle Network Service infrastructure, including
112- encrypted network traffic and security features.
113-
114- - Extensive Oracle data type support, including large object support (CLOB
115- and BLOB).
116-
117- - Direct binding to SQL objects. One great use case is binding Python
118- objects to Oracle Spatial SDO objects.
119-
120- - Array operations for efficient INSERT and UPDATEs.
121-
122- - Array row counts and batch error handling for array operations.
123-
124- - Fetching of large result sets.
125-
126- - REF CURSOR support.
127-
128- - Support for scrollable cursors. Go back and forth through your query
129- results.
130-
131- - Fetch PL/SQL Implicit Results. Easily return query results from
132- PL/SQL.
133-
134- - Row Prefetching. Efficient use of the network.
135-
136- - Client Result Caching. Improve performance of frequently executed
137- look-up statements.
138-
139- - Support for Advanced Queuing. Use database notifications to build
140- micro-service applications.
141-
142- - Continuous Query Notification. Get notified when data changes.
143-
144- - Support for Edition Based Redefinition. Easily switch applications
145- to use updated PL/SQL logic.
146-
147- - Support for setting application context during the creation of a
148- connection, making application metadata more accessible to the
149- database, including in LOGON triggers.
150-
151- - End-to-end monitoring and tracing.
152-
153- - Transaction Management.
154-
155- - Session Pooling.
156-
157- - Database Resident Connection Pooling (DRCP).
158-
159- - Privileged Connections.
36+ ## Tests
16037
161- - External Authentication .
38+ See [ /test ] [ 11 ] .
16239
163- - Database startup and shutdown.
40+ ## Contributing
16441
165- - Sharded Databases
42+ See [ CONTRIBUTING ] ( https://github.com/oracle/python-cx_Oracle/blob/master/CONTRIBUTING.md )
16643
167- - Oracle Database High Availability Features, such as FAN notifications and Transaction Guard support.
44+ ## License
16845
169- ** DB API specification exclusions** : The time data type is not
170- supported by Oracle and is therefore not implemented. The method
171- ` cursor.nextset() ` is not implemented either as the DB API specification assumes
172- an implementation of cursors that does not fit well with Oracle's implementation
173- of cursors and implicit results. See the method ` cursor.getimplicitresults() `
174- for more information.
46+ cx_Oracle is licensed under a BSD license which you can find [ here] [ 3 ] .
17547
17648[ 1 ] : https://www.python.org/dev/peps/pep-0249
17749[ 2 ] : http://cx-oracle.readthedocs.io
17850[ 3 ] : https://github.com/oracle/python-cx_Oracle/blob/master/LICENSE.txt
179- [ 4 ] : https://www.python.org/downloads/
18051[ 5 ] : http://lists.sourceforge.net/lists/listinfo/cx-oracle-users
181- [ 6 ] : http ://cx-oracle.readthedocs.io/en/latest/installation.html#quick-start-cx-oracle-installation
52+ [ 6 ] : https ://github.com/oracle/python-cx_Oracle/tree/master/samples/tutorial
18253[ 7 ] : http://cx-oracletools.sourceforge.net
18354[ 8 ] : http://cx-pyoraclelib.sourceforge.net
18455[ 9 ] : https://github.com/oracle/python-cx_Oracle/issues
185- [ 10 ] : https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/SampleEnv.sql
18656[ 11 ] : https://github.com/oracle/python-cx_Oracle/tree/master/test
18757[ 12 ] : https://github.com/oracle/python-cx_Oracle/tree/master/samples
188- [ 13 ] : https://github.com/oracle/python-cx_Oracle/tree/master/samples/SampleEnv.py
18958[ 14 ] : http://cx-oracle.readthedocs.io/en/latest/releasenotes.html
19059[ 15 ] : http://cx-oracle.readthedocs.io/en/latest/installation.html
191- [ 16 ] : https://github.com/oracle/python-cx_Oracle/tree/master/samples/README.md
192- [ 17 ] : https://github.com/oracle/db-sample-schemas
193- [ 18 ] : http://cx-oracle.readthedocs.io/en/latest/whatsnew.html
0 commit comments