1- # Open Source Python/Oracle Utility - cx_Oracle
1+ # Python cx_Oracle interface to Oracle Database
22
33cx_Oracle is a Python extension module that enables access to Oracle Database.
44It conforms to the [ Python database API 2.0 specification] [ 1 ] with a
@@ -11,61 +11,45 @@ cx_Oracle 6 has been tested with Python version 2.7, and with versions
1111client libraries. Oracle's standard client-server version
1212interoperability allows connection to both older and newer databases,
1313for example Oracle 12.2 client libraries can connect to Oracle
14- Database 11.2 or later .
14+ Database 11.2.
1515
16- ## Documentation
16+ ## Getting Started
1717
18- See the [ cx_Oracle Documentation ] [ 2 ] and [ Release Notes ] [ 14 ] .
18+ Install Python from [ python.org ] [ 4 ] .
1919
20- ## Help
20+ Install cx_Oracle using [ Quick Start cx_Oracle Installation ] [ 6 ] .
2121
22- Issues and questions can be raised with the cx_Oracle community on
23- [ GitHub ] [ 9 ] or on the [ mailing list ] [ 5 ] .
22+ Download cx_Oracle [ samples ] [ 12 ] or create a script like the one
23+ below .
2424
25- ## Installation
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.
2629
27- See [ cx_Oracle Installation] [ 15 ] for detailed instructions.
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 ] .
2836
29- - The simplest way to install cx_Oracle 6 is with pip :
37+ Run the Python script, for example :
3038
3139```
32- python -m pip install cx_Oracle --upgrade
40+ python myscript.py
3341```
3442
35- If a binary wheel package is not available on [ PyPI] [ 6 ] for your platform, the
36- source package will be used.
37-
38- Note that if you download a source zip file directly from GitHub
39- that you will also need to download an [ ODPI-C] [ 10 ] source zip file
40- and extract it inside the directory called "odpi".
41-
42- - After cx_Oracle is installed, Oracle client libraries must also be installed
43- and configured. These can be from Oracle Instant Client, from a local Oracle
44- Database, or from a full Oracle Client installation.
45-
46- If you need the libraries, download and unzip the [ Oracle Instant Client] [ 4 ]
47- 'Basic' package for your platform and set PATH, LD_LIBRARY_PATH, or similar
48- platform-specific library path loading environment. See
49- the [ installation notes for ODPI-C] [ 13 ] for help.
50-
51- Versions 11.2, 12.1 and 12.2 of the Oracle Client libraries on Linux,
52- Windows and macOS are supported. Users have also reported success
53- with other platforms.
54-
55- If you require cx_Oracle 5.3, download a Windows installer from
56- [ PyPI] [ 16 ] or use ` python -m pip install cx-oracle==5.3 ` to
57- install from source.
58-
59- Very old versions of cx_Oracle can be found in the files section at
60- [ SourceForce] [ 17 ] .
61-
62- ## Example
43+ ### Sample cx_Oracle Script
6344
6445``` python
46+ # myscript.py
47+
6548from __future__ import print_function
6649
6750import cx_Oracle
6851
52+ # Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer.
6953connection = cx_Oracle.connect(" hr" , " welcome" , " localhost/orclpdb" )
7054
7155cursor = connection.cursor()
@@ -79,9 +63,32 @@ for fname, lname in cursor:
7963print (" Values:" , fname, lname)
8064```
8165
82- For more examples, please see the [ test suite] [ 11 ] and the
83- [ samples] [ 12 ] . You can also look at the scripts in [ cx_OracleTools] [ 7 ] and
84- the modules in [ cx_PyOracleLib] [ 8 ] .
66+ ## Installation
67+
68+ See [ cx_Oracle Installation] [ 15 ] .
69+
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+ ## Documentation
77+
78+ See the [ cx_Oracle Documentation] [ 2 ] .
79+
80+ ## Changes
81+
82+ See [ What's New] [ 18 ] and the [ Release Notes] [ 14 ] .
83+
84+ ## Tests
85+
86+ See the [ test suite] [ 11 ] .
87+
88+ ## Help
89+
90+ Issues and questions can be raised with the cx_Oracle community on
91+ [ GitHub] [ 9 ] or on the [ mailing list] [ 5 ] .
8592
8693## Features
8794
@@ -169,17 +176,18 @@ for more information.
169176[ 1 ] : https://www.python.org/dev/peps/pep-0249
170177[ 2 ] : http://cx-oracle.readthedocs.io
171178[ 3 ] : https://github.com/oracle/python-cx_Oracle/blob/master/LICENSE.txt
172- [ 4 ] : http ://www.oracle.com/technetwork/database/features/instant-client/index.html
179+ [ 4 ] : https ://www.python.org/downloads/
173180[ 5 ] : http://lists.sourceforge.net/lists/listinfo/cx-oracle-users
174- [ 6 ] : https ://pypi.python.org/pypi/cx_Oracle
181+ [ 6 ] : http ://cx-oracle.readthedocs.io/en/latest/installation.html#quick-start-cx-oracle-installation
175182[ 7 ] : http://cx-oracletools.sourceforge.net
176183[ 8 ] : http://cx-pyoraclelib.sourceforge.net
177184[ 9 ] : https://github.com/oracle/python-cx_Oracle/issues
178- [ 10 ] : https://oracle. github.io/odpi
185+ [ 10 ] : https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/SampleEnv.sql
179186[ 11 ] : https://github.com/oracle/python-cx_Oracle/tree/master/test
180187[ 12 ] : https://github.com/oracle/python-cx_Oracle/tree/master/samples
181- [ 13 ] : https://oracle. github.io/odpi/doc/installation.html
188+ [ 13 ] : https://github.com/oracle/python-cx_Oracle/tree/master/samples/SampleEnv.py
182189[ 14 ] : http://cx-oracle.readthedocs.io/en/latest/releasenotes.html
183190[ 15 ] : http://cx-oracle.readthedocs.io/en/latest/installation.html
184- [ 16 ] : https://pypi.python.org/pypi/cx_Oracle/5.3
185- [ 17 ] : https://sourceforge.net/projects/cx-oracle/files/
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