Skip to content

Commit 2df11c5

Browse files
Doc updates.
1 parent 665a090 commit 2df11c5

13 files changed

+166
-68
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Run:
3030
python -m pip install oracledb --upgrade
3131
```
3232

33-
See [python-oracledb Installation][installation] for details.
33+
See [Installing python-oracledb][installation] for details.
3434

3535
## Samples
3636

doc/src/release_notes.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3048,8 +3048,7 @@ cx_Oracle 6.0 beta 1 (April 2017)
30483048
:ref:`subscription objects <subscrobj>`. Use the qos attribute instead.
30493049
#) Dropped deprecated parameters cqqos and rowids from the
30503050
:meth:`Connection.subscribe()` method. Use the qos parameter instead as
3051-
shown in this `sample <https://github.com/oracle/python-cx_Oracle/blob/
3052-
main/samples/cqn.py>`__.
3051+
shown in the cx_Oracle sample cqn.py.
30533052

30543053

30553054
cx_Oracle 5.3 (March 2017)

doc/src/user_guide/appendix_c.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
Appendix C: The python-oracledb and cx_Oracle Drivers
55
*****************************************************
66

7-
The python-oracledb driver is the renamed, major version successor to cx_Oracle
8-
8.3. The python-oracledb driver has many :ref:`new features <releasenotes>` and
9-
some :ref:`deprecations` compared with cx_Oracle. The cx_Oracle driver is
10-
obsolete and should not be used for new development.
7+
The python-oracledb driver is the renamed, successor to cx_Oracle. The
8+
python-oracledb driver has many :ref:`new features <releasenotes>` and some
9+
:ref:`deprecations` compared with cx_Oracle. The cx_Oracle driver is obsolete
10+
and should not be used for new development.
1111

1212
.. _upgrading83:
1313

doc/src/user_guide/authentication_methods.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ Using an Oracle Wallet for External Authentication
149149

150150
The following steps give an overview of using an Oracle Wallet. Wallets should
151151
be kept securely. Wallets can be managed with `Oracle Wallet Manager
152-
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&
153-
id=GUID-E3E16C82-E174-4814-98D5-EADF1BCB3C37>`__.
152+
<https://docs.oracle.com/en/database/oracle/oracle-database/21/dbimi/using-
153+
oracle-wallet-manager.html#GUID-E3E16C82-E174-4814-98D5-EADF1BCB3C37>`__.
154154

155155
In this example the wallet is created for the ``myuser`` schema in the
156156
directory ``/home/oracle/wallet_dir``. The ``mkstore`` command is available
@@ -690,8 +690,7 @@ the following table.
690690
- Description
691691
- Required or Optional
692692
* - ``auth_type``
693-
- The authentication type. The value should be the string "ConfigFileAuthentication",
694-
"InstancePrincipal", "SecurityToken", "SecurityTokenSimple" or "SimpleAuthentication".
693+
- The authentication type. The value should be the string "ConfigFileAuthentication", "InstancePrincipal", "SecurityToken", "SecurityTokenSimple" or "SimpleAuthentication".
695694

696695
With Configuration File Authentication, the location of a configuration file containing the necessary information must be provided. By default, this file is located at */home/username/.oci/config*, unless a custom location is specified during OCI IAM setup.
697696

@@ -708,8 +707,7 @@ the following table.
708707
* - ``user``
709708
- The Oracle Cloud Identifier (OCID) of the user invoking the API. For example, *ocid1.user.oc1..<unique_ID>*.
710709

711-
This parameter can be specified when the value of the ``auth_type`` key is "SimpleAuthentication". This is not required when ``auth_type`` is
712-
"SecurityToken" or "SecurityTokenSimple"
710+
This parameter can be specified when the value of the ``auth_type`` key is "SimpleAuthentication". This is not required when ``auth_type`` is "SecurityToken" or "SecurityTokenSimple"
713711
- Required
714712
* - ``key_file``
715713
- The full path and filename of the private key.

doc/src/user_guide/batch_statement.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,12 @@ Depending on data sizes and business requirements, database changes such as
523523
temporarily disabling redo logging on the table, or disabling indexes may also
524524
be beneficial.
525525

526+
The PyArrow package's CSV methods may be more efficient than the default CSV
527+
module.
528+
526529
See `samples/load_csv.py <https://github.com/oracle/python-oracledb/tree/main/
527-
samples/load_csv.py>`__ for a runnable example.
530+
samples/load_csv.py>`__ for a runnable example showing both the CSV module and
531+
PyArrow's CSV functionality.
528532

529533
You should also review whether Oracle's specialized data loading tools and
530534
features suit your environment. These can be faster than using Python. See

doc/src/user_guide/connection_handling.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,6 +3958,8 @@ its own directory. For each connection use different connection string
39583958
file. It is recommended to use Oracle Client libraries 19.17 (or later) when
39593959
using :ref:`multiple wallets <connmultiwallets>`.
39603960

3961+
If you are behind a firewall, see :ref:`firewallproxy`.
3962+
39613963
Using the Easy Connect Syntax with Oracle Autonomous Database
39623964
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
39633965

doc/src/user_guide/extending.rst

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,15 @@ packages, you can create a `namespace package <https://packaging.python.org/en
137137
can distribute plugin packages either internally within your organization, or
138138
on a package repository such as `PyPI <https://pypi.org/>`__.
139139

140+
**Example 1**
141+
140142
The following example creates a plugin that uses a :ref:`connection protocol
141143
hook function <registerprotocolhook>` to do special processing of connection
142144
strings prefixed with "myprefix://".
143145

144-
1. In a terminal or IDE, create a working directory, for example ``myplugin``.
145-
Inside the working directory create the subdirectory hierarchy
146-
``src/oracledb/plugins/``::
146+
1. In a terminal or IDE, create a working directory, for example ``myplugin``::
147147

148148
mkdir myplugin
149-
mkdir -p myplugin/src/oracledb/plugins
150149

151150
2. In the ``myplugin`` directory, create the following files:
152151

@@ -181,7 +180,14 @@ strings prefixed with "myprefix://".
181180
[options.packages.find]
182181
where = src
183182

184-
3. Create the plugin code in ``myplugin/src/oracledb/plugins/myplugin.py``:
183+
3. In the ``myplugin`` directory, create the subdirectory hierarchy
184+
``src/oracledb/plugins/``:
185+
186+
.. code-block:: shell
187+
188+
mkdir -p src/oracledb/plugins
189+
190+
4. Create the plugin's code in ``myplugin/src/oracledb/plugins/myplugin.py``:
185191

186192
.. code-block:: python
187193
@@ -193,18 +199,25 @@ strings prefixed with "myprefix://".
193199
194200
oracledb.register_protocol("myprefix", myhookfunc)
195201
202+
5. In the ``myplugin`` directory, build the sample package:
196203

197-
4. Build the sample package::
204+
.. code-block:: shell
198205
199-
cd myplugin
200206
python -m pip install build
201207
python -m build
202208
203-
5. Install the sample package::
209+
This creates your plugin package wheel in the ``dist`` subdirectory with a
210+
name like ``myplugin-1.0.0-py3-none-any.whl``. You can distribute and
211+
install this package.
212+
213+
6. Install the sample package:
214+
215+
.. code-block:: shell
204216
205217
python -m pip install dist/myplugin-1.0.0-py3-none-any.whl
206218
207-
6. To show the plugin being used, create an application file containing:
219+
7. To show the plugin in use, create an application file in a working directory
220+
containing:
208221

209222
.. code-block:: python
210223
@@ -223,14 +236,18 @@ strings prefixed with "myprefix://".
223236
In myhookfunc: protocol=myprefix arg=localhost/orclpdb
224237
host=localhost, port=1521, service name=orclpdb
225238

226-
7. To uninstall the plugin, simply remove the package::
239+
8. To uninstall the plugin, remove the package:
240+
241+
.. code-block:: shell
227242
228243
python -m pip uninstall myplugin
229244
230-
Another sample plugin shows how all connection creations can be logged,
245+
**Example 2**
246+
247+
The following sample plugin shows how all connection creations can be logged,
231248
regardless of the connection string. If the plugin
232-
``myplugin/src/oracledb/plugins/myplugin.py`` registers a :ref:`connection
233-
parameter hook <paramshook>`:
249+
``myplugin/src/oracledb/plugins/myplugin.py`` created above contained code to
250+
register a :ref:`connection parameter hook <paramshook>`:
234251

235252
.. code-block:: python
236253

doc/src/user_guide/globalization.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ Time Zone Files
6666
This section applies to python-oracledb Thick mode.
6767

6868
Oracle Client libraries and the Oracle Database use time zone files for date
69-
operations. The files are versioned, but do not always have to be the same
70-
version on the database and client.
69+
operations. The files are versioned, but do not always have to be the same
70+
version on the database and client. However, if you use the TIMESTAMP WITH
71+
TIMEZONE data type and have a named time zone, you will get the error `ORA-1805
72+
<https://docs.oracle.com/en/error-help/db/ora-01805/>`__ when the database and
73+
the client time zone file versions differ.
7174

7275
Finding the Time Zone Files in Use
7376
----------------------------------
@@ -113,6 +116,18 @@ The Oracle Database documentation contains more information about time zone
113116
files, see `Choosing a Time Zone File <https://www.oracle.com/pls/topic/
114117
lookup?ctx=dblatest&id=GUID-805AB986-DE12-4FEA-AF56-5AABCD2132DF>`__.
115118

119+
Changing the Oracle Database Time Zone File
120+
-------------------------------------------
121+
122+
To control the database time zone file in on-premise databases, use the
123+
`DBMS_DST <https://www.oracle.com/pls/topic/lookup?ctx=
124+
dblatest&id=GUID-55300506-481A-4957-A67D-0183D3D986DF>`__ package.
125+
126+
For Oracle Autonomous Database, use ``AUTO_DST_UPGRADE`` and
127+
``AUTO_DST_UPGRADE_EXCL_DATA`` as shown in the documentation `Manage Time Zone
128+
File Updates on Autonomous AI Database <https://www.oracle.com/pls/topic/
129+
lookup?ctx=dblatest&id=GUID-BACC9C4A-C0FA-4912-862A-1A2A24D6A0C2>`__.
130+
116131
Changing the Oracle Client Time Zone File
117132
-----------------------------------------
118133

doc/src/user_guide/initialization.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ python-oracledb uses them. Python-oracledb is said to be in 'Thick' mode when
1313
Oracle Client libraries are used. Both modes have comprehensive functionality
1414
supporting the Python Database API v2.0 Specification.
1515

16+
Most applications can use python-oracledb Thin mode. The common reasons to use
17+
Thick mode are:
18+
19+
- Your Oracle Database is version 11, or older
20+
- Your database connections require :ref:`Native Network Encryption (NNE) or
21+
checksumming <nne>`
22+
- You desire to use :ref:`Application Continuity (AC) or Transparent
23+
Application Continuity (TAC) <appcont>`
24+
1625
All connections in an application use the same mode. See :ref:`vsessconinfo`
1726
to verify which mode is in use.
1827

@@ -622,7 +631,7 @@ The common environment variables listed below are supported in python-oracledb.
622631
* - NLS_LANG
623632
- Determines the 'national language support' globalization options for python-oracledb.
624633

625-
Note that from cx_Oracle 8, the character set component is ignored and only the language and territory components of ``NLS_LANG`` are used. The character set can instead be specified during connection or connection pool creation. See :ref:`globalization`.
634+
Note that the character set component is ignored and only the language and territory components of ``NLS_LANG`` are used. The character set can instead be specified during connection or connection pool creation. See :ref:`globalization`.
626635
- Thick
627636
* - ORA_SDTZ
628637
- The default session time zone.

doc/src/user_guide/installation.rst

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ Installing python-oracledb
77
***************************
88

99
The python-oracledb driver allows Python applications to connect to Oracle
10-
Database.
11-
12-
The python-oracledb driver is the renamed, major version successor to cx_Oracle
13-
8.3. For upgrade information, see :ref:`upgrading83`. The cx_Oracle driver is
14-
obsolete and should not be used for new development.
10+
Database with no extra libraries needed.
1511

1612
.. figure:: /images/python-oracledb-thin-arch.png
1713
:alt: architecture of the python-oracledb driver
@@ -31,9 +27,10 @@ Specification.
3127
Quick Start python-oracledb Installation
3228
========================================
3329

34-
Python-oracledb is typically installed from Python's package repository
35-
`PyPI <https://pypi.org/project/oracledb/>`__ using `pip
36-
<https://pip.pypa.io/en/latest/installation/>`__.
30+
Python-oracledb is typically installed from Python's package repository `PyPI
31+
<https://pypi.org/project/oracledb/>`__ using `pip
32+
<https://pip.pypa.io/en/latest/installation/>`__ or `uv
33+
<https://pypi.org/project/uv/>`__.
3734

3835
1. Install `Python 3 <https://www.python.org/downloads>`__ if it is not already
3936
available.
@@ -208,22 +205,14 @@ resulting binary installed. Compiling python-oracledb requires the
208205
this file is in the ``python-devel`` package or equivalent.
209206

210207
On some platforms the Python binary may be called ``python3`` instead of
211-
``python``. For example, to use the default Python 3.6 installation on Oracle
212-
Linux 8, install with:
213-
214-
.. code-block:: shell
215-
216-
python3 -m pip install oracledb --upgrade
217-
218-
Note it is recommended to use a more recent version Python, see `Python for
219-
Oracle Linux <https://yum.oracle.com/oracle-linux-python.html>`__.
208+
``python``.
220209

221210
The installation ``--user`` option is useful when you do not have permission to
222211
write to system directories:
223212

224213
.. code-block:: shell
225214
226-
python3 -m pip install oracledb --upgrade --user
215+
python -m pip install oracledb --upgrade --user
227216
228217
If you are behind a proxy, use the ``--proxy`` option. For example:
229218

0 commit comments

Comments
 (0)