Skip to content

Commit f1a3fa2

Browse files
Documentation improvements.
1 parent 12a935a commit f1a3fa2

File tree

4 files changed

+67
-54
lines changed

4 files changed

+67
-54
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ Thick Mode Changes
4040
Common Changes
4141
++++++++++++++
4242

43-
#) Added support for token authentication (Azure OAuth and IAM) via the new
44-
parameter `access_token` to :func:`oracledb.connect()` and
43+
#) Added support for Azure Active Directory OAuth 2.0 and Oracle Cloud
44+
Infrastructure Identity and Access Management (IAM) token authentication
45+
via the new parameter `access_token` to :func:`oracledb.connect()` and
4546
:func:`oracledb.create_pool()`.
4647
#) Added method :func:`oracledb.is_thin_mode()` to support determining whether
4748
the driver is using thin mode or not

doc/src/user_guide/aq.rst

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -209,31 +209,30 @@ Dequeuing is done like this:
209209
Using Recipient Lists
210210
=====================
211211

212-
You can associate a list of recipient names with a message at the time of
213-
enqueuing the message. This feature limits the set of recipients that have
214-
to dequeue each message.
215-
216-
The recipient list associated with a message overrides the queue subscriber
217-
list, if it exists. It is not mandatory to include the recipient name in the
218-
subscriber list and if desired, it can be included.
219-
220-
To dequeue a message, the consumername attribute can be set to one of the
221-
recipient names. The original message recipient list is not available
222-
on dequeued messages. All recipients have to dequeue a message
223-
before it gets removed from the queue.
224-
225-
When subscribing to a queue, each subscriber can dequeue all the messages
226-
placed into a specific queue and each recipient is a designated target of
227-
a particular message.
228-
212+
A list of recipient names can be associated with a message at the time
213+
a message is enqueued. This allows a limited set of recipients to
214+
dequeue each message. The recipient list associated with the message
215+
overrides the queue subscriber list, if there is one. The recipient
216+
names need not be in the subscriber list but can be, if desired.
217+
218+
To dequeue a message, the ``consumername`` attribute can be set to
219+
one of the recipient names. The original message recipient list is
220+
not available on dequeued messages. All recipients have to dequeue
221+
a message before it gets removed from the queue.
222+
223+
Subscribing to a queue is like subscribing to a magazine: each
224+
subscriber can dequeue all the messages placed into a specific queue,
225+
just as each magazine subscriber has access to all its articles.
226+
However, being a recipient is like getting a letter: each recipient
227+
is a designated target of a particular message.
229228

230229
For example::
231230

232231
props = self.connection.msgproperties(payload=book,recipients=["sub2", "sub3"])
233232
queue.enqone(props)
234233

235-
Later, when dequeuing messages a specific recipient can be set to get messages intended
236-
for that recipient::
234+
Later, when dequeuing messages, a specific recipient can be set to get the
235+
messages intended for that recipient using the ``consumername`` attribute::
237236

238237
queue.deqoptions.consumername = "sub3"
239238
m = queue.deqone()

doc/src/user_guide/connection_handling.rst

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,40 +1656,44 @@ Operating System Authentication.
16561656

16571657
.. _tokenauth:
16581658

1659-
Token Based Authentication
1659+
Token-Based Authentication
16601660
==========================
16611661

1662-
Token Based Authentication allows applications to validate user access by using
1663-
an encrypted authentication token. An authentication token provides users with
1664-
access to the database for a limited period of time without having to enter
1665-
their database username and password. The two authentication methods
1666-
supported are :ref:`Open Authorization (OAuth 2.0) <oauth2>` and :ref:`Oracle
1662+
Token-Based Authentication allows users to connect to a database by using an
1663+
encrypted authentication token without having to enter a database username and
1664+
password. The authentication token must be valid and not expired for the
1665+
connection to be successful. Users already connected will be able to continue
1666+
work after their token has expired but they will not be able to reconnect
1667+
without getting a new token.
1668+
1669+
The two authentication methods supported by python-oracledb are
1670+
:ref:`Open Authorization (OAuth 2.0) <oauth2>` and :ref:`Oracle
16671671
Cloud Infrastructure (OCI) Identity and Access Management (IAM) <iamauth>`.
16681672

16691673
.. _oauth2:
16701674

1671-
Connecting Using OAuth 2.0 Token Based Authentication
1675+
Connecting Using OAuth 2.0 Token-Based Authentication
16721676
-----------------------------------------------------
16731677

16741678
Oracle Cloud Infrastructure (OCI) users can be centrally managed in a Microsoft
1675-
Azure Active Directory (Azure AD) service. Open Authorization (OAuth 2.0) token based
1679+
Azure Active Directory (Azure AD) service. Open Authorization (OAuth 2.0) token-based
16761680
authentication allows users to authenticate to Oracle Database using Azure AD OAuth2
16771681
tokens. Currently, only Azure AD tokens are supported. Ensure that you have a
16781682
Microsoft Azure account and your Oracle Database is registered with Azure AD. See
16791683
`Configuring the Oracle Autonomous Database for Microsoft Azure AD Integration
16801684
<https://www.oracle.com/pls/topic/lookup?ctx=db19&id=
16811685
GUID-0A60F22D-56A3-408D-8EC8-852C38C159C0>`_ for more information.
1682-
Both Thin and Thick modes of the python-oracledb driver support OAuth 2.0 token based
1686+
Both Thin and Thick modes of the python-oracledb driver support OAuth 2.0 token-based
16831687
authentication.
16841688

16851689
When using python-oracledb in Thick mode, Oracle Client libraries 19.15 (or later),
16861690
or 21.7 (or later) are needed.
16871691

1688-
OAuth 2.0 token based authentication can be used for both standalone connections
1692+
OAuth 2.0 token-based authentication can be used for both standalone connections
16891693
and connection pools. Tokens can be specified using the connection parameter
16901694
introduced in python-oracledb 1.1. Users of earlier python-oracledb versions
16911695
can alternatively use
1692-
:ref:`OAuth 2.0 Token Based Authentication Connection Strings<oauth2connstr>`.
1696+
:ref:`OAuth 2.0 Token-Based Authentication Connection Strings<oauth2connstr>`.
16931697

16941698
OAuth2 Token Generation And Extraction
16951699
++++++++++++++++++++++++++++++++++++++
@@ -1765,12 +1769,12 @@ See :ref:`curl` for an alternative way to generate the tokens.
17651769
Standalone Connection Creation with OAuth2 Access Tokens
17661770
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17671771

1768-
For OAuth 2.0 Token Based Authentication, the ``access_token`` connection parameter
1772+
For OAuth 2.0 Token-Based Authentication, the ``access_token`` connection parameter
17691773
must be specified. This parameter should be a string (or a callable that returns a
17701774
string) specifying an Azure AD OAuth2 token.
17711775

17721776
Standalone connections can be created in the python-oracledb Thick and Thin modes
1773-
using OAuth 2.0 token based authentication. In the examples below, the
1777+
using OAuth 2.0 token-based authentication. In the examples below, the
17741778
``access_token`` parameter is set to a callable.
17751779

17761780
**In python-oracledb Thin mode**
@@ -1806,7 +1810,7 @@ TokenHandlerOAuth() used in the example, see :ref:`oauthhandler`.
18061810
Connection Pool Creation with OAuth2 Access Tokens
18071811
++++++++++++++++++++++++++++++++++++++++++++++++++
18081812

1809-
For OAuth 2.0 Token Based Authentication, the ``access_token`` connection
1813+
For OAuth 2.0 Token-Based Authentication, the ``access_token`` connection
18101814
parameter must be specified. This parameter should be a string (or a callable
18111815
that returns a string) specifying an Azure AD OAuth2 token.
18121816

@@ -1815,7 +1819,7 @@ mode. The ``homogeneous`` parameter must be set to True in both the
18151819
python-oracledb Thin and Thick modes.
18161820

18171821
Connection pools can be created in the python-oracledb Thick and Thin modes
1818-
using OAuth 2.0 token based authentication. In the examples below, the
1822+
using OAuth 2.0 token-based authentication. In the examples below, the
18191823
``access_token`` parameter is set to a callable.
18201824

18211825
Note that the ``access_token`` parameter should be set to a callable. This is
@@ -1856,18 +1860,18 @@ TokenHandlerOAuth() used in the example, see :ref:`oauthhandler`.
18561860
18571861
.. _oauth2connstr:
18581862

1859-
OAuth 2.0 Token Based Authentication Connection Strings
1863+
OAuth 2.0 Token-Based Authentication Connection Strings
18601864
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
18611865

18621866
The connection string used by python-oracledb can specify the directory where
18631867
the token file is located. This syntax is usable with older versions of
18641868
python-oracledb. However, it is recommended to use connection parameters
18651869
introduced in python-oracledb 1.1 instead. See
1866-
:ref:`OAuth 2.0 Token Based Authentication<oauth2>`.
1870+
:ref:`OAuth 2.0 Token-Based Authentication<oauth2>`.
18671871

18681872
.. note::
18691873

1870-
OAuth 2.0 Token Based Authentication Connection Strings is only supported in
1874+
OAuth 2.0 Token-Based Authentication Connection Strings is only supported in
18711875
the python-oracledb Thick mode. See :ref:`enablingthick`.
18721876

18731877
There are different ways to retrieve Azure AD OAuth2 tokens. Some of the ways to
@@ -1950,22 +1954,22 @@ Connection pool example:
19501954
19511955
.. _iamauth:
19521956

1953-
Connecting Using OCI IAM Token Based Authentication
1957+
Connecting Using OCI IAM Token-Based Authentication
19541958
---------------------------------------------------
19551959

19561960
Oracle Cloud Infrastructure (OCI) Identity and Access Management (IAM) provides
19571961
its users with a centralized database authentication and authorization system.
19581962
Using this authentication method, users can use the database access token issued
19591963
by OCI IAM to authenticate to the Oracle Cloud Database. Both Thin and Thick modes
1960-
of the python-oracledb driver support OCI IAM token based authentication.
1964+
of the python-oracledb driver support OCI IAM token-based authentication.
19611965

19621966
When using python-oracledb in Thick mode, Oracle Client libraries 19.14 (or later),
19631967
or 21.5 (or later) are needed.
19641968

1965-
OCI IAM token based authentication can be used for both standalone connections and
1969+
OCI IAM token-based authentication can be used for both standalone connections and
19661970
connection pools. Tokens can be specified using the connection parameter
19671971
introduced in python-oracledb 1.1. Users of earlier python-oracledb versions
1968-
can alternatively use :ref:`OCI IAM Token Based Authentication Connection Strings
1972+
can alternatively use :ref:`OCI IAM Token-Based Authentication Connection Strings
19691973
<iamauthconnstr>`.
19701974

19711975
OCI IAM Token Generation and Extraction
@@ -2037,12 +2041,12 @@ parameter set to True.
20372041
Standalone Connection Creation with OCI IAM Access Tokens
20382042
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
20392043

2040-
For OCI IAM Token Based Authentication, the ``access_token`` connection parameter
2044+
For OCI IAM Token-Based Authentication, the ``access_token`` connection parameter
20412045
must be specified. This parameter should be a 2-tuple (or a callable that returns
20422046
a 2-tuple) containing the token and private key.
20432047

20442048
Standalone connections can be created in the python-oracledb Thick and Thin modes
2045-
using OCI IAM token based authentication. In the examples below, the
2049+
using OCI IAM token-based authentication. In the examples below, the
20462050
``access_token`` parameter is set to a callable.
20472051

20482052
**In python-oracledb Thin mode**
@@ -2078,7 +2082,7 @@ TokenHandlerIAM() used in the example, see :ref:`iamhandler`.
20782082
Connection Pool Creation with OCI IAM Access Tokens
20792083
+++++++++++++++++++++++++++++++++++++++++++++++++++
20802084

2081-
For OCI IAM Token Based Authentication, the ``access_token`` connection
2085+
For OCI IAM Token-Based Authentication, the ``access_token`` connection
20822086
parameter must be specified. This parameter should be a 2-tuple (or a callable
20832087
that returns a 2-tuple) containing the token and private key.
20842088

@@ -2087,7 +2091,7 @@ mode. The ``homogeneous`` parameter must be set to True in both the
20872091
python-oracledb Thin and Thick modes.
20882092

20892093
Connection pools can be created in the python-oracledb Thick and Thin modes
2090-
using OCI IAM token based authentication. In the examples below, the
2094+
using OCI IAM token-based authentication. In the examples below, the
20912095
``access_token`` parameter is set to a callable.
20922096

20932097
Note that the ``access_token`` parameter should be set to a callable. This is
@@ -2130,18 +2134,18 @@ TokenHandlerIAM() used in the example, see :ref:`iamhandler`.
21302134
21312135
.. _iamauthconnstr:
21322136

2133-
OCI IAM Token Based Authentication Connection Strings
2137+
OCI IAM Token-Based Authentication Connection Strings
21342138
+++++++++++++++++++++++++++++++++++++++++++++++++++++
21352139

21362140
The connection string used by python-oracledb can specify the directory where
21372141
the token and private key files are located. This syntax is usable with older
21382142
versions of python-oracledb. However, it is recommended to use connection
21392143
parameters introduced in python-oracledb 1.1 instead. See
2140-
:ref:`OCI IAM Token Based Authentication<iamauth>`.
2144+
:ref:`OCI IAM Token-Based Authentication<iamauth>`.
21412145

21422146
.. note::
21432147

2144-
OCI IAM Token Based Authentication Connection Strings is only supported in
2148+
OCI IAM Token-Based Authentication Connection Strings is only supported in
21452149
the python-oracledb Thick mode. See :ref:`enablingthick`.
21462150

21472151
The Oracle Cloud Infrastructure command line interface (OCI-CLI) can be used

doc/src/user_guide/installation.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ resulting binary installed. Compiling python-oracledb requires the
195195
``Python.h`` header file. If you are using the default ``python`` package,
196196
this file is in the ``python-devel`` package or equivalent.
197197

198-
On Oracle Linux 8, to use the default Python 3.6 installation, install with:
198+
On Oracle Linux 8, to use the default Python 3.6 installation,
199+
install with:
199200

200201
.. code-block:: shell
201202
@@ -806,21 +807,29 @@ Troubleshooting
806807

807808
If installation fails:
808809

810+
- An error such as ``not a supported wheel on this platform.`` indicates that
811+
you may be using an older `pip` version. Upgrade it with the following
812+
command:
813+
814+
.. code-block:: shell
815+
816+
python -m pip install pip --upgrade --user
817+
809818
- Use option ``-v`` with pip. Review your output and logs. Try to install
810819
using a different method. **Google anything that looks like an error.**
811820
Try some potential solutions.
812821

813822
- If there was a network connection error, check if you need to set the
814823
environment variables ``http_proxy`` and/or ``https_proxy`` or
815-
try ``pip install --proxy=http://proxy.example.com:80 oracledb
824+
try ``python -m pip install --proxy=http://proxy.example.com:80 oracledb
816825
--upgrade``.
817826

818827
- If the upgrade did not give any errors but the old version is still
819-
installed, try ``pip install oracledb --upgrade
828+
installed, try ``python -m pip install oracledb --upgrade
820829
--force-reinstall``.
821830

822831
- If you do not have access to modify your system version of
823-
Python, then use ``pip install oracledb --upgrade --user``
832+
Python, then use ``python -m pip install oracledb --upgrade --user``
824833
or venv.
825834

826835
- If you get the error ``No module named pip``, it means that the pip module

0 commit comments

Comments
 (0)