Skip to content

Commit 4c4513f

Browse files
Improve documentation.
1 parent 7edc0dd commit 4c4513f

File tree

3 files changed

+80
-44
lines changed

3 files changed

+80
-44
lines changed

README.md

+32-40
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
11
# Open Source Python/Oracle Utility - cx_Oracle
22

3-
cx_Oracle is a Python extension module that enables access to Oracle Database
4-
and conforms to the Python database API 2.0 specifications with a considerable
5-
number of additions and a couple of exclusions. The time data type is not
6-
supported by Oracle and is therefore not implemented. The method
7-
cursor.nextset() is not implemented either as the DB API specification assumes
8-
an implementation of cursors that does not fit well with Oracle's
9-
implementation of cursors and implicit results. See the method
10-
cursor.getimplicitresults() for more information.
11-
12-
See [PEP 249][1] for more information on the Python database API specification.
13-
See the [documentation][2] for a complete description of the module's
14-
capabilities.
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.
156

16-
cx_Oracle is licensed under a BSD license which you can find [here][3].
7+
cx_Oracle is licensed under a [BSD license] which you can find [here][3].
178

18-
cx_Oracle has been tested with Python version 2.7, and with versions 3.4 and
9+
cx_Oracle 6 has been tested with Python version 2.7, and with versions 3.4 and
1910
higher. You can use cx_Oracle with Oracle 11.2, 12.1 and 12.2 client libraries,
2011
allowing connection to multiple Oracle Database versions. Oracle's standard
2112
client-server version interoperability allows connection to both older and
22-
newer databases, for example Oracle 11.2 client libraries can connect to Oracle
23-
Database 10.2 or later.
24-
25-
Please note that an Oracle client (or server) installation is required in order
26-
to use cx_Oracle. If you do not require the tools that come with a full client
27-
installation, it is recommended to install the [Instant Client][4].
28-
which is far easier to install.
13+
newer databases, for example Oracle 12.2 client libraries can connect to Oracle
14+
Database 11.2 or later.
2915

3016
## Help
3117

@@ -38,35 +24,33 @@ See the [cx_Oracle Documentation][2] and [Release Notes][14].
3824

3925
## Installation
4026

41-
The simplest way to install cx_Oracle 6 Beta is with pip:
27+
See [cx_Oracle Installation][15] for detailed instructions.
4228

43-
python -m pip install cx_Oracle --pre
29+
- The simplest way to install cx_Oracle 6 RC2 is with pip:
4430

45-
If a binary wheel package is not available on [PyPI][6] for your
46-
platform, the source package will be used.
31+
`python -m pip install cx_Oracle --pre`
4732

48-
If you prefer, the source package can be downloaded manually from [PyPI][6] and
49-
extracted, after which the following commands should be run:
33+
If a binary wheel package is not available on [PyPI][6] for your platform, the
34+
source package will be used.
5035

51-
python setup.py build
52-
python setup.py install
53-
54-
Note that if you download a source zip file directly from GitHub that
55-
you will also need to download an [ODPI-C][10] source zip file and
56-
extract it inside a directory called "odpi".
36+
- After cx_Oracle is installed, Oracle client libraries must also be installed
37+
and configured. These can be from Oracle Instant Client, from a local Oracle
38+
Database, or from a full Oracle Client installation.
5739

58-
After cx_Oracle is installed, Oracle client libraries must also be
59-
installed and configured. If you need the libraries, you can download
60-
and unzip the [Oracle Instant Client][4] 'Basic' package for your
61-
platform and set PATH, LD_LIBRARY_PATH, or similar platform-specific
62-
library path loading environment. See the
63-
[installation notes for ODPI-C][13] for help with installing and configuring an
64-
Oracle client.
40+
If you need the libraries, download and unzip the [Oracle Instant Client][4]
41+
'Basic' package for your platform and set PATH, LD_LIBRARY_PATH, or similar
42+
platform-specific library path loading environment. See
43+
the [installation notes for ODPI-C][13] for help.
6544

6645
Versions 11.2, 12.1 and 12.2 of the Oracle Client libraries on Linux,
6746
Windows and macOS are supported. Users have also reported success
6847
with other platforms.
6948

49+
Note that if you download a source zip file directly from GitHub that
50+
you will also need to download an [ODPI-C][10] source zip file and
51+
extract it inside the directory called "odpi".
52+
53+
7054
## Usage Example
7155

7256

@@ -176,6 +160,13 @@ the modules in the [cx_PyOracleLib][8] projects.
176160

177161
- Oracle Database High Availability Features, such as FAN notifications and Transaction Guard support.
178162

163+
**DB API specification exclusions**: The time data type is not
164+
supported by Oracle and is therefore not implemented. The method
165+
`cursor.nextset()` is not implemented either as the DB API specification assumes
166+
an implementation of cursors that does not fit well with Oracle's implementation
167+
of cursors and implicit results. See the method `cursor.getimplicitresults()`
168+
for more information.
169+
179170
[1]: https://www.python.org/dev/peps/pep-0249
180171
[2]: http://cx-oracle.readthedocs.io
181172
[3]: https://github.com/oracle/python-cx_Oracle/blob/master/LICENSE.txt
@@ -190,3 +181,4 @@ the modules in the [cx_PyOracleLib][8] projects.
190181
[12]: https://github.com/oracle/python-cx_Oracle/tree/master/samples
191182
[13]: https://oracle.github.io/odpi/doc/installation.html
192183
[14]: http://cx-oracle.readthedocs.io/en/latest/releasenotes.html
184+
[15]: http://cx-oracle.readthedocs.io/en/latest/installation.html

doc/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
The generated cx_Oracle documentation is at http://cx-oracle.readthedocs.io/
2+
3+
This directory contains the documentation source. It is written using reST
4+
(re-Structured Text) format source files which are processed using Sphinx and
5+
turned into HTML, PDF or ePub documents. If you wish to build these yourself,
6+
you need to install Sphinx. Sphinx is available on many Linux distributions as a
7+
pre-built package. You can also install Sphinx on all platforms using the Python
8+
package manager "pip". For more information on Sphinx, please visit this page:
9+
10+
http://www.sphinx-doc.org
11+
12+
Once Sphinx is installed, the supplied Makefile can be used to build the
13+
different targets.

doc/src/installation.rst

+35-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ After cx_Oracle has been installed, you must also `Install Oracle Client`_, if
1919
that has not been done already. Oracle Client versions 12.2, 12.1 and 11.2
2020
are supported.
2121

22+
Note installation has changed from cx_Oracle 5. When using Oracle
23+
Instant Client, you should not set ``ORACLE_HOME``.
2224

2325
Install Using Pip
2426
=================
@@ -30,9 +32,13 @@ on all platforms is::
3032

3133
This will download and install a pre-compiled binary matching your platform
3234
and architecture automatically, if one is available. Pre-compiled binaries are
33-
available for Windows and Linux. If a pre-compiled binary is not
34-
available, the source will be downloaded, compiled and the resulting binary
35-
installed.
35+
available for Windows and Linux.
36+
37+
If a pre-compiled binary is not available, the source will be
38+
downloaded, compiled and the resulting binary installed. On macOS,
39+
make you are not using the bundled Python - use `Homebrew
40+
<https://brew.sh>`__ or `Python.org
41+
<https://www.python.org/downloads>`__ instead.
3642

3743

3844
Install Using GitHub
@@ -46,6 +52,21 @@ In order to install using the source on GitHub, use the following commands::
4652
git submodule update
4753
python setup.py install
4854

55+
Note that if you download a source zip file directly from GitHub then
56+
you will also need to download an `ODPI-C
57+
<https://github.com/oracle/odpi>`__ source zip file and extract it
58+
inside the directory called "odpi".
59+
60+
Install Using Source from PyPI
61+
==============================
62+
63+
The source package can be downloaded manually from
64+
`PyPI <https://pypi.python.org/pypi/cx_Oracle>`__ and extracted, after
65+
which the following commands should be run:
66+
67+
python setup.py build
68+
python setup.py install
69+
4970

5071
Install Using RPM
5172
=================
@@ -79,6 +100,14 @@ index.html>`__. Only the "Basic" or "Basic Light" package is required. Oracle
79100
Client libraries are also available in any Oracle Database installation or
80101
full Oracle Client installation.
81102

103+
On Windows, `Microsoft Windows Redistributables
104+
<https://oracle.github.io/odpi/doc/installation.html#windows>`__
105+
matching the version of the Oracle client libraries need to be
106+
installed.
107+
108+
Oracle Database
109+
===============
110+
82111
Oracle Client libraries allow connection to older and newer databases.
83112
In summary, Oracle Client 12.2 can connect to Oracle Database 11.2 or
84113
greater. Oracle Client 12.1 can connect to Oracle Database 10.2 or
@@ -146,7 +175,6 @@ If installation fails:
146175
subdirectory called "odpi" containing files. If missing, review the
147176
section on `Install Using GitHub`_.
148177

149-
150178
If importing cx_Oracle fails:
151179

152180
- Do you get the error "``DPI-1047: Oracle Client library cannot be
@@ -160,3 +188,6 @@ If importing cx_Oracle fails:
160188
<https://oracle.github.io/odpi/doc/installation.html#windows>`__ have been
161189
installed.
162190

191+
- If you have both Python 2 and 3 installed, make sure you are
192+
using the correct python and pip (or python3 and pip3)
193+
executables.

0 commit comments

Comments
 (0)