Skip to content

Commit 8ce2c3b

Browse files
Documentation improvements.
1 parent c2ec365 commit 8ce2c3b

File tree

3 files changed

+32
-30
lines changed

3 files changed

+32
-30
lines changed

Diff for: doc/src/user_guide/initialization.rst

+19-17
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,8 @@ default Thin mode to the Thick mode requires the addition of a call to
2121
:func:`oracledb.init_oracle_client()` and an application restart. Other small
2222
changes may also be required.
2323

24-
The Thick mode is enabled by:
25-
26-
- Calling :func:`~oracledb.init_oracle_client()` in the application as shown in
27-
sections below.
28-
29-
- If you are changing from the default Thin mode, then refer to :ref:`featuresummary`
30-
and :ref:`driverdiff` for other changes that may be needed.
31-
32-
- If you are upgrading a cx_Oracle application to python-oracledb, then refer
33-
to :ref:`upgrading83` for other changes that may be needed.
24+
The Thick mode is enabled by calling :func:`~oracledb.init_oracle_client()` in
25+
the application as shown in sections below.
3426

3527
.. note::
3628

@@ -44,6 +36,13 @@ The Thick mode is enabled by:
4436
Once the Thick mode is enabled, all connections will be in Thick mode and you
4537
cannot go back to Thin mode.
4638

39+
If you are changing from the default Thin mode, then refer to
40+
:ref:`featuresummary` and :ref:`driverdiff` for other changes that may be
41+
needed.
42+
43+
If you are upgrading a cx_Oracle application to python-oracledb, then refer to
44+
:ref:`upgrading83` for other changes that may be needed.
45+
4746
You can validate the python-oracledb mode by querying the ``CLIENT_DRIVER``
4847
column of ``V$SESSION_CONNECT_INFO`` and verifying if the value of the column
4948
begins with ``python-oracledb thk``. See :ref:`vsessconinfo`.
@@ -223,12 +222,15 @@ Linux, you might use::
223222
Using oracledb.init_oracle_client() to set the Oracle Client directory
224223
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
225224

226-
Applications must call the function :meth:`oracledb.init_oracle_client()` to
227-
specify the directory containing Oracle Instant Client libraries. The Oracle
228-
Client Libraries are loaded when ``init_oracle_client()`` is called. For
229-
example, if the Oracle Instant Client Libraries are in
225+
Oracle Client Libraries are loaded when :meth:`oracledb.init_oracle_client()`
226+
is called. In some environments, applications can use the ``lib_dir``
227+
parameter to specify the directory containing the Oracle Client libraries.
228+
Otherwise, the system library search path should contain the relevant library
229+
directory before Python is invoked.
230+
231+
For example, if the Oracle Instant Client Libraries are in
230232
``C:\oracle\instantclient_19_9`` on Windows or
231-
``$HOME/Downloads/instantclient_19_8`` on macOS, then you can use:
233+
``$HOME/Downloads/instantclient_19_8`` on macOS (Intel x86), then you can use:
232234

233235
.. code-block:: python
234236
@@ -237,7 +239,7 @@ example, if the Oracle Instant Client Libraries are in
237239
import platform
238240
239241
d = None # default suitable for Linux
240-
if platform.system() == "Darwin":
242+
if platform.system() == "Darwin" and platform.machine() == "x86_64":
241243
d = os.environ.get("HOME")+"/Downloads/instantclient_19_8")
242244
elif platform.system() == "Windows":
243245
d = r"C:\oracle\instantclient_19_14"
@@ -409,7 +411,7 @@ The `oraaccess.xml` file has other uses including:
409411

410412
- Changing the value of Fast Application Notification :ref:`FAN <fan>` events which affects notifications and Runtime Load Balancing (RLB).
411413
- Configuring `Client Result Caching <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-D2FA7B29-301B-4AB8-8294-2B1B015899F9>`__ parameters
412-
- Turning on `Client Statement Cache Auto-tuning <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&d=GUID-6E21AA56-5BBE-422A-802C-197CAC8AAEA4>`__
414+
- Turning on `Client Statement Cache Auto-tuning <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-75169FE4-DE2C-431F-BBA7-3691C7C33360>`__
413415

414416
Refer to the documentation on `oraaccess.xml
415417
<https://www.oracle.com/pls/topic/lookup?

Diff for: doc/src/user_guide/installation.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ quickly.
8686
4. In your integrated development environment (IDE) or terminal window, set
8787
the three environment variables used by the test program.
8888

89-
Simple :ref:`connection <connhandling>` to the database requires an Oracle
89+
A simple :ref:`connection <connhandling>` to the database requires an Oracle
9090
Database `user name and password
9191
<https://www.youtube.com/watch?v=WDJacg0NuLo>`_ and a database
9292
:ref:`connection string <connstr>`. Set the environment variables to your
@@ -414,7 +414,7 @@ Installing python-oracledb on Windows
414414
Install python-oracledb
415415
------------------------
416416

417-
Use Python's `Pip <https://pip.readthedocs.io/en/latest/installing/>`__ package
417+
Use Python's `pip <https://pip.pypa.io/en/latest/installation/>`__ package
418418
to install python-oracledb from Python's package repository `PyPI
419419
<https://pypi.org/project/oracledb/>`__::
420420

@@ -587,7 +587,7 @@ architectures.
587587
Install python-oracledb
588588
-----------------------
589589

590-
Use Python's `Pip <https://pip.readthedocs.io/en/latest/installing/>`__ package
590+
Use Python's `pip <https://pip.pypa.io/en/latest/installation/>`__ package
591591
to install python-oracledb from Python's package repository `PyPI
592592
<https://pypi.org/project/oracledb/>`__:
593593

Diff for: doc/src/user_guide/introduction.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ information, see :ref:`upgrading83`.
1515

1616
Python-oracledb is typically installed from Python's package repository
1717
`PyPI <https://pypi.org/project/oracledb/>`__ using `pip
18-
<https://pip.pypa.io/en/latest/installing/>`__. See :ref:`installation` for
18+
<https://pip.pypa.io/en/latest/installation/>`__. See :ref:`installation` for
1919
more information.
2020

2121
Architecture
2222
============
2323

24-
The python-oracledb driver can run in either the Thin mode or Thick mode,
25-
which is determined by an application setting.
24+
Python-oracledb is a 'Thin' driver with an optional 'Thick' mode enabled by an
25+
application setting.
2626

2727
python-oracledb Thin Mode Architecture
2828
--------------------------------------
2929

30-
By default, python-oracledb runs in a 'Thin' mode which connects directly to
31-
Oracle Database 12.1 or later. This mode does not need Oracle Client libraries.
30+
By default, python-oracledb allows connecting directly to Oracle Database 12.1
31+
or later. This Thin mode does not need Oracle Client libraries.
3232

3333
.. _thinarchfig:
3434
.. figure:: /images/python-oracledb-thin-arch.png
@@ -48,9 +48,9 @@ The Oracle Net behavior can optionally be configured by using a
4848
python-oracledb Thick Mode Architecture
4949
---------------------------------------
5050

51-
Python-oracledb is said to be in 'Thick' mode when Oracle Client libraries are
52-
used. An application script runtime option enables this mode by loading the
53-
libraries, see :ref:`enablingthick`. This gives you some :ref:`additional
51+
Python-oracledb is said to be in 'Thick' mode when it links with Oracle Client
52+
libraries. An application script runtime option enables this mode by loading
53+
the libraries, see :ref:`enablingthick`. This gives you some :ref:`additional
5454
functionality <featuresummary>`. Depending on the version of the Oracle Client
5555
libraries, this mode of python-oracledb can connect to Oracle Database 9.2 or
5656
later.
@@ -99,7 +99,7 @@ The python-oracledb feature highlights are:
9999

100100
* Easy installation from PyPI
101101
* Support for multiple Oracle Database versions
102-
* Works with common frameworks and ORMs
102+
* Supports the `Python Database API v2.0 Specification <https://www.python.org/dev/peps/pep-0249/>`__ with a considerable number of additions and a couple of exclusions. * Works with common frameworks and ORMs
103103
* Execution of SQL and PL/SQL statements
104104
* Extensive Oracle data type support, including JSON, large objects (``CLOB`` and
105105
``BLOB``) and binding of SQL objects
@@ -123,5 +123,5 @@ Runnable examples are in the `GitHub samples directory
123123
<https://github.com/oracle/python-oracledb/tree/main/samples>`__.
124124
A tutorial `Python and Oracle Database Tutorial: The New Wave of Scripting
125125
<https://oracle.github.io/python-oracledb
126-
/samples/tutorial/Python-and-Oracle-Database-Scripting-for-the-Future.html>`__
126+
/samples/tutorial/Python-and-Oracle-Database-The-New-Wave-of-Scripting.html>`__
127127
is also available.

0 commit comments

Comments
 (0)