1
- # Python cx_Oracle interface to Oracle Database
1
+ # cx_Oracle version 6.2
2
2
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.
8
9
9
10
cx_Oracle 6 has been tested with Python version 2.7, and with versions
10
11
3.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,
13
14
for example Oracle 12.2 client libraries can connect to Oracle
14
15
Database 11.2.
15
16
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
-
66
17
## Installation
67
18
68
19
See [ cx_Oracle Installation] [ 15 ] .
69
20
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
-
76
21
## Documentation
77
22
78
- See the [ cx_Oracle Documentation] [ 2 ] .
23
+ See the [ cx_Oracle Documentation] [ 2 ] and [ Release Notes ] [ 14 ] .
79
24
80
- ## Changes
25
+ ## Samples
81
26
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 ] .
87
30
88
31
## Help
89
32
90
33
Issues and questions can be raised with the cx_Oracle community on
91
34
[ GitHub] [ 9 ] or on the [ mailing list] [ 5 ] .
92
35
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
160
37
161
- - External Authentication .
38
+ See [ /test ] [ 11 ] .
162
39
163
- - Database startup and shutdown.
40
+ ## Contributing
164
41
165
- - Sharded Databases
42
+ See [ CONTRIBUTING ] ( https://github.com/oracle/python-cx_Oracle/blob/master/CONTRIBUTING.md )
166
43
167
- - Oracle Database High Availability Features, such as FAN notifications and Transaction Guard support.
44
+ ## License
168
45
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 ] .
175
47
176
48
[ 1 ] : https://www.python.org/dev/peps/pep-0249
177
49
[ 2 ] : http://cx-oracle.readthedocs.io
178
50
[ 3 ] : https://github.com/oracle/python-cx_Oracle/blob/master/LICENSE.txt
179
- [ 4 ] : https://www.python.org/downloads/
180
51
[ 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
182
53
[ 7 ] : http://cx-oracletools.sourceforge.net
183
54
[ 8 ] : http://cx-pyoraclelib.sourceforge.net
184
55
[ 9 ] : https://github.com/oracle/python-cx_Oracle/issues
185
- [ 10 ] : https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/SampleEnv.sql
186
56
[ 11 ] : https://github.com/oracle/python-cx_Oracle/tree/master/test
187
57
[ 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
189
58
[ 14 ] : http://cx-oracle.readthedocs.io/en/latest/releasenotes.html
190
59
[ 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