Skip to content

Commit 0ff266f

Browse files
Further doc improvements.
1 parent 4f7e9b6 commit 0ff266f

File tree

8 files changed

+119
-80
lines changed

8 files changed

+119
-80
lines changed

doc/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
Sphinx is used to generate the HTML for the python-oracledb documentation.
22

3-
The generated python-oracledb documentation is at https://python-oracledb.readthedocs.io/
3+
The generated python-oracledb documentation is at
4+
https://python-oracledb.readthedocs.io/
45

56
This directory contains the documentation source. It is written using reST
67
(re-Structured Text). The source files are processed using Sphinx and can be
78
turned into HTML, PDF or ePub documentation.
89

9-
If you wish to build documentation yourself, install Sphinx. It is available
10-
on many Linux distributions as a pre-built package. You can also install it
11-
using the Python package manager "pip", for example::
10+
If you wish to build documentation yourself, install Sphinx and the Read the
11+
Docs theme. Sphinx is available on many Linux distributions as a pre-built
12+
package. You can also install Sphinx and the Read the Docs theme using the
13+
Python package manager "pip", for example::
1214

13-
python -m pip install Sphinx
15+
python -m pip install -r requirements.txt
1416

1517
For more information on Sphinx, please visit this page:
1618

doc/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
sphinx==4.1.2
1+
sphinx>=4.2.0
2+
sphinx-rtd-theme

doc/src/api_manual/connect_param.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ ConnectParams Methods
3737
https_proxy=None, https_proxy_port=None, service_name=None, sid=None, \
3838
server_type=None, cclass=None, purity=None, expire_time=None, retry_count=None, \
3939
retry_delay=None, tcp_connect_timeout=None, ssl_server_dn_match=None, \
40-
ssl_server_cert_dn=None, wallet_location=None, events=None, mode=None, \
41-
disable_oob=None, stmtcachesize=None, edition=None, tag=None, matchanytag=None, \
42-
config_dir=None, appcontext=[], shardingkey=[], supershardingkey=[], debug_jdwp=None, \
43-
handle=None)
40+
ssl_server_cert_dn=None, wallet_location=None, events=None, externalauth=None, \
41+
mode=None, disable_oob=None, stmtcachesize=None, edition=None, tag=None, \
42+
matchanytag=None, config_dir=None, appcontext=[], shardingkey=[], supershardingkey=[], \
43+
debug_jdwp=None, handle=None)
4444

4545
Sets one or more of the parameters.
4646

@@ -127,6 +127,18 @@ ConnectParams Attributes
127127

128128
This attribute is supported in the python-oracledb Thin and Thick modes.
129129

130+
.. attribute:: ConnectParams.externalauth
131+
132+
This read-only attribute is a boolean that specifies whether external
133+
authentication should be used. The default value is False.
134+
135+
For standalone connections, external authentication occurs when the
136+
``user`` and ``password`` attributes are not used. If these attributes,
137+
are not used, you can optionally set the ``externalauth`` attribute to
138+
True, which may aid code auditing.
139+
140+
This attribute is only supported in the python-oracledb Thick mode.
141+
130142
.. attribute:: ConnectParams.host
131143

132144
This read-only attribute is a string that returns the name or IP address of

doc/src/api_manual/module.rst

Lines changed: 74 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,14 @@ Oracledb Methods
4949

5050
.. function:: connect(dsn=None, pool=None, conn_class=None, params=None, user=None, \
5151
proxy_user=None, password=None, newpassword=None, wallet_password=None, \
52-
host=None, port=None, protocol=None, https_proxy=None, https_proxy_port=None, \
53-
service_name=None, sid=None, server_type=None, cclass=None, purity=None, \
54-
expire_time=None, retry_count=None, retry_delay=None, tcp_connect_timeout=None, \
55-
ssl_server_dn_match=None, ssl_server_cert_dn=None, wallet_location=None, \
56-
events=None, mode=None, disable_oob=None, stmtcachesize=None, edition=None, \
57-
tag=None, matchanytag=None, config_dir=None, appcontext=[], shardingkey=[], \
58-
supershardingkey=[], debug_jdwp=None, handle=None)
52+
host=None, port=1521, protocol="tcp", https_proxy=None, https_proxy_port=0, \
53+
service_name=None, sid=None, server_type=None, cclass=None, purity=oracledb.PURITY_DEFAULT, \
54+
expire_time=0, retry_count=0, retry_delay=0, tcp_connect_timeout=60.0, \
55+
ssl_server_dn_match=True, ssl_server_cert_dn=None, wallet_location=None, \
56+
events=False, externalauth=False, mode=oracledb.AUTH_MODE_DEFAULT, disable_oob=False, \
57+
stmtcachesize=oracledb.defaults.stmtcachesize, edition=None, tag=None, matchanytag=False, \
58+
config_dir=oracledb.defaults.config_dir, appcontext=[], shardingkey=[], supershardingkey=[], \
59+
debug_jdwp=None, handle=0)
5960

6061
Constructor for creating a connection to the database. Returns a
6162
:ref:`Connection Object <connobj>`. All parameters are optional and can be
@@ -216,10 +217,18 @@ Oracledb Methods
216217
query notification and high availability event notifications. The default
217218
value is False.
218219

220+
The ``externalauth`` parameter is a boolean that specifies whether external
221+
authentication should be used. This value is only used in the python-oracledb
222+
Thick mode. The default value is False. For standalone connections,
223+
external authentication occurs when the ``user`` and ``password`` attributes
224+
are not used. If these attributes are not used, you can optionally set the
225+
``externalauth`` attribute to True, which may aid code auditing.
226+
219227
If the ``mode`` parameter is specified, it must be one of the
220228
:ref:`connection authorization modes <connection-authorization-modes>`
221229
which are defined at the module level. This value is used in both the
222-
python-oracledb Thin and Thick modes.The default value is 0.
230+
python-oracledb Thin and Thick modes. The default value is
231+
:data:`oracledb.AUTH_MODE_DEFAULT`.
223232

224233
The ``disable_oob`` parameter is expected to be a boolean that indicates
225234
whether out-of-band breaks should be disabled. This value is only used
@@ -273,17 +282,17 @@ Oracledb Methods
273282
PowerBuilder) which has already made the connection. The connection thus
274283
created should *never* be used after the source handle has been closed or
275284
destroyed. This value is only used in the python-oracledb Thick mode. It
276-
should be used with extreme caution.
285+
should be used with extreme caution. The default value is 0.
277286

278287
.. function:: ConnectParams(user=None, proxy_user=None, password=None, \
279-
newpassword=None, wallet_password=None, host=None, port=None, protocol=None, \
280-
https_proxy=None, https_proxy_port=None, service_name=None, sid=None, \
281-
server_type=None, cclass=None, purity=oracledb.PURITY_DEFAULT, expire_time=None, \
282-
retry_count=None, retry_delay=None, tcp_connect_timeout=None, ssl_server_dn_match=None, \
283-
ssl_server_cert_dn=None, wallet_location=None, events=None, mode=None, \
284-
disable_oob=None, stmtcachesize=None, edition=None, tag=None, matchanytag=None, \
285-
config_dir=None, appcontext=None, shardingkey=None, supershardingkey=None, \
286-
debug_jdwp=None, handle=None)
288+
newpassword=None, wallet_password=None, host=None, port=1521, protocol="tcp", \
289+
https_proxy=None, https_proxy_port=0, service_name=None, sid=None, \
290+
server_type=None, cclass=None, purity=oracledb.PURITY_DEFAULT, expire_time=0, \
291+
retry_count=0, retry_delay=0, tcp_connect_timeout=60.0, ssl_server_dn_match=True, \
292+
ssl_server_cert_dn=None, wallet_location=None, events=False, externalauth=False, \
293+
mode=oracledb.AUTH_MODE_DEFAULT, disable_oob=False, stmtcachesize=oracledb.defaults.stmtcachesize, \
294+
edition=None, tag=None, matchanytag=False, config_dir=oracledb.defaults.config_dir, \
295+
appcontext=[], shardingkey=[], supershardingkey=[], debug_jdwp=None, handle=0)
287296

288297
Contains all the parameters that can be used to establish a connection to the database.
289298

@@ -407,9 +416,16 @@ Oracledb Methods
407416
query notification and high availability event notifications. The default
408417
value is False.
409418

419+
The ``externalauth`` parameter is a boolean that specifies whether external
420+
authentication should be used. This value is only used in the python-oracledb
421+
Thick mode. The default value is False. For standalone connections,
422+
external authentication occurs when the ``user`` and ``password`` attributes
423+
are not used. If these attributes are not used, you can optionally set the
424+
``externalauth`` attribute to True, which may aid code auditing.
425+
410426
The ``mode`` parameter is expected to be an integer that identifies the
411427
authorization mode to use. This value is used in both the python-oracledb
412-
Thin and Thick modes.The default value is 0.
428+
Thin and Thick modes.The default value is :data:`oracledb.AUTH_MODE_DEFAULT`.
413429

414430
The ``disable_oob`` parameter is expected to be a boolean that indicates
415431
whether out-of-band breaks should be disabled. This value is only used
@@ -463,25 +479,26 @@ Oracledb Methods
463479

464480
The ``handle`` parameter is expected to be an integer which represents a
465481
pointer to a valid service context handle. This value is only used in the
466-
python-oracledb Thick mode. It should be used with extreme caution.
482+
python-oracledb Thick mode. It should be used with extreme caution. The
483+
default value is 0.
467484

468485

469486
.. function:: create_pool(dsn=None, pool_class=oracledb.ConnectionPool, \
470-
params=None, min=1, max=2, increment=1, \
471-
connectiontype=oracledb.Connection, getmode=None, homogeneous=None, \
472-
externalauth=None, timeout=0, wait_timeout=0, max_lifetime_session=0, \
473-
session_callback=None, max_sessions_per_shard=0, \
474-
soda_metadata_cache=False, ping_interval=60, user=None, \
475-
proxy_user=None, password=None, newpassword=None, \
487+
params=None, min=1, max=2, increment=1, connectiontype=oracledb.Connection, \
488+
getmode=oracledb.POOL_GETMODE_WAIT, homogeneous=True, timeout=0, \
489+
wait_timeout=0, max_lifetime_session=0, session_callback=None, \
490+
max_sessions_per_shard=0, soda_metadata_cache=False, ping_interval=60, \
491+
user=None, proxy_user=None, password=None, newpassword=None, \
476492
wallet_password=None, host=None, port=1521, protocol="tcp", \
477-
https_proxy=None, https_proxy_port=None, service_name=None, sid=None, \
493+
https_proxy=None, https_proxy_port=0, service_name=None, sid=None, \
478494
server_type=None, cclass=None, purity=oracledb.PURITY_DEFAULT, \
479-
expire_time=0, retry_count=0, retry_delay=0, tcp_connect_timeout=60, \
495+
expire_time=0, retry_count=0, retry_delay=0, tcp_connect_timeout=60.0, \
480496
ssl_server_dn_match=True, ssl_server_cert_dn=None, \
481-
wallet_location=None, events=False, mode=oracledb.AUTH_MODE_DEFAULT, \
482-
disable_oob=None, stmtcachesize=None, edition=None, tag=None, \
483-
matchanytag=None, config_dir=None, appcontext=[], shardingkey=[], \
484-
supershardingkey=[], debug_jdwp=None, handle=0)
497+
wallet_location=None, events=False, externalauth=False, \
498+
mode=oracledb.AUTH_MODE_DEFAULT, disable_oob=False, \
499+
stmtcachesize=oracledb.defaults.stmtcachesize, edition=None, tag=None, \
500+
matchanytag=False, config_dir=oracledb.defaults.config_dir, appcontext=[], \
501+
shardingkey=[], supershardingkey=[], debug_jdwp=None, handle=0)
485502

486503
Creates a connection pool with the supplied parameters and returns the
487504
:ref:`ConnectionPool object <connpool>` for the pool. See :ref:`Connection
@@ -508,7 +525,7 @@ Oracledb Methods
508525
``params`` parameter object. Similar precedence rules also apply to other
509526
values.
510527

511-
The ``user``, ``password`` and ``dsn`` parameters are the same as for
528+
The ``user``, ``password``, and ``dsn`` parameters are the same as for
512529
:meth:`oracledb.connect()`.
513530

514531
The ``pool_class`` parameter is expected to be a
@@ -529,10 +546,12 @@ Oracledb Methods
529546
behavior. A fixed pool size where ``min`` equals ``max`` is
530547
:ref:`recommended <connpoolsize>` to help prevent connection storms and to
531548
help overall system stability. The ``min`` parameter is the number of
532-
connections opened when the pool is created. The ``increment`` is the
533-
number of connections that are opened whenever a connection request exceeds
534-
the number of currently open connections. The ``max`` parameter is the
535-
maximum number of connections that can be open in the connection pool.
549+
connections opened when the pool is created. The default value of the
550+
``min`` parameter is 1. The ``increment`` parameter is the number of connections
551+
that are opened whenever a connection request exceeds the number of currently
552+
open connections. The default value of the ``increment`` parameter is 1.
553+
The ``max`` parameter is the maximum number of connections that can be open
554+
in the connection pool. The default value of the ``max`` parameter is 2.
536555

537556
If the ``connectiontype`` parameter is specified, all calls to
538557
:meth:`ConnectionPool.acquire()` will create connection objects of that
@@ -549,9 +568,6 @@ Oracledb Methods
549568
connections are homogeneous (same user) or heterogeneous (multiple
550569
users). The default value is True.
551570

552-
The ``externalauth`` parameter is a boolean that determines whether to use
553-
external authentication. The default value is False.
554-
555571
The ``timeout`` parameter is the length of time (in seconds) that a
556572
connection may remain idle in the pool before it is terminated. If the
557573
value of this parameter is 0, then the connections are never terminated.
@@ -697,10 +713,15 @@ Oracledb Methods
697713
query notification and high availability event notifications. The default
698714
value is False.
699715

716+
The ``externalauth`` parameter is a boolean that determines whether to use
717+
external authentication. This value is only used in the python-oracledb Thick
718+
mode. The default value is False.
719+
700720
If the ``mode`` parameter is specified, it must be one of the
701721
:ref:`connection authorization modes <connection-authorization-modes>`
702722
which are defined at the module level. This value is used in both the
703-
python-oracledb Thin and Thick modes.The default value is 0.
723+
python-oracledb Thin and Thick modes.The default value is
724+
:data:`oracledb.AUTH_MODE_DEFAULT`.
704725

705726
The ``disable_oob`` parameter is expected to be a boolean that indicates
706727
whether out-of-band breaks should be disabled. This value is only used
@@ -757,7 +778,7 @@ Oracledb Methods
757778
PowerBuilder) which has already made the connection. The connection thus
758779
created should *never* be used after the source handle has been closed or
759780
destroyed. This value is only used in the python-oracledb Thick mode. It
760-
should be used with extreme caution.
781+
should be used with extreme caution. The deault value is 0.
761782

762783
In the python-oracledb Thick mode, connection pooling is handled by
763784
Oracle's `Session pooling <https://www.oracle.com/pls/topic/lookup?
@@ -849,16 +870,16 @@ Oracledb Methods
849870
This method is an extension to the DB API definition.
850871

851872
.. function:: PoolParams(min=1, max=2, increment=1, connectiontype=None, \
852-
getmode=oracledb.POOL_GETMODE_WAIT, homogeneous=True, externalauth=False, \
853-
timeout=0, wait_timeout=0, max_lifetime_session=0, session_callback=None, \
873+
getmode=oracledb.POOL_GETMODE_WAIT, homogeneous=True, timeout=0, \
874+
wait_timeout=0, max_lifetime_session=0, session_callback=None, \
854875
max_sessions_per_shard=0, soda_metadata_cache=False, ping_interval=60, \
855876
user=None, proxy_user=Nonde, password=None, newpassword=None, \
856877
wallet_password=None, host=None, port=1521, protocol="tcp", \
857-
https_proxy=None, https_proxy_port=None, service_name=None, sid=None, \
878+
https_proxy=None, https_proxy_port=0, service_name=None, sid=None, \
858879
server_type=None, cclass=None, purity=oracledb.PURITY_DEFAULT, \
859-
expire_time=0, retry_count=0, retry_delay=0, tcp_connect_timeout=60, \
880+
expire_time=0, retry_count=0, retry_delay=0, tcp_connect_timeout=60.0, \
860881
ssl_server_dn_match=True, ssl_server_cert_dn=None, wallet_location=None, \
861-
events=False, mode=oracledb.AUTH_MODE_DEFAULT, disable_oob=False, \
882+
events=False, externalauth=False, mode=oracledb.AUTH_MODE_DEFAULT, disable_oob=False, \
862883
stmtcachesize=oracledb.defaults.stmtcachesize, edition=None, tag=None, \
863884
matchanytag=False, config_dir=oracledb.defaults.config_dir, appcontext=[], \
864885
shardingkey=[], supershardingkey=[], debug_jdwp=None, handle=0)
@@ -893,9 +914,6 @@ Oracledb Methods
893914
connections are homogeneous (same user) or heterogeneous (multiple users).
894915
The default value is True.
895916

896-
The ``externalauth`` parameter is a boolean that determines whether to use
897-
external authentication. The default value is False.
898-
899917
The ``timeout`` parameter is the length of time (in seconds) that a
900918
connection may remain idle in the pool before it is terminated. If the
901919
value of this parameter is 0, then the connections are never terminated.
@@ -1043,6 +1061,10 @@ Oracledb Methods
10431061
the file, cwallet.sso. This value is used in both the python-oracledb Thin
10441062
and Thick modes.
10451063

1064+
The ``externalauth`` parameter is a boolean that determines whether to use
1065+
external authentication. This value is only used in the python-oracledb Thick
1066+
mode. The default value is False.
1067+
10461068
The ``events`` parameter is expected to be a boolean that specifies whether
10471069
the events mode should be enabled. This value is only used in the
10481070
python-oracledb Thick mode. This parameter is needed for continuous
@@ -1051,7 +1073,7 @@ Oracledb Methods
10511073

10521074
The ``mode`` parameter is expected to be an integer that identifies the
10531075
authorization mode to use. This value is used in both the python-oracledb
1054-
Thin and Thick modes.The default value is 0.
1076+
Thin and Thick modes.The default value is :data:`oracledb.AUTH_MODE_DEFAULT`.
10551077

10561078
The ``disable_oob`` parameter is expected to be a boolean that indicates
10571079
whether out-of-band breaks should be disabled. This value is only used
@@ -1107,7 +1129,8 @@ Oracledb Methods
11071129

11081130
The ``handle`` parameter is expected to be an integer which represents a
11091131
pointer to a valid service context handle. This value is only used in the
1110-
python-oracledb Thick mode. It should be used with extreme caution.
1132+
python-oracledb Thick mode. It should be used with extreme caution. The
1133+
default value is 0.
11111134

11121135
.. function:: Time(hour, minute, second)
11131136

@@ -1753,8 +1776,6 @@ module.html#session-pool-get-modes>`_ constants that were used in cx_Oracle
17531776
of time (defined by the ``wait_timeout`` parameter) for a session to become
17541777
available before returning with an error.
17551778

1756-
This constant is not supported in the python-oracledb Thin mode.
1757-
17581779
.. note::
17591780

17601781
This constant deprecates the ``SPOOL_ATTRVAL_TIMEDWAIT`` constant that

doc/src/api_manual/pool_params.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ PoolParams Methods
3737
https_proxy=None, https_proxy_port=None, service_name=None, sid=None, \
3838
server_type=None, cclass=None, purity=None, expire_time=None, retry_count=None, \
3939
retry_delay=None, tcp_connect_timeout=None, ssl_server_dn_match=None, \
40-
ssl_server_cert_dn=None, wallet_location=None, events=None, mode=None, \
41-
disable_oob=None, stmtcachesize=None, edition=None, tag=None, matchanytag=None, \
42-
config_dir=None, appcontext=[], shardingkey=[], supershardingkey=[], debug_jdwp=None, \
43-
handle=None)
40+
ssl_server_cert_dn=None, wallet_location=None, events=None, externalauth=None, \
41+
mode=None, disable_oob=None, stmtcachesize=None, edition=None, tag=None, \
42+
matchanytag=None, config_dir=None, appcontext=[], shardingkey=[], supershardingkey=[], \
43+
debug_jdwp=None, handle=None)
4444

4545
Sets one or more of the parameters.
4646

@@ -58,14 +58,6 @@ PoolParams Attributes
5858

5959
This attribute is supported in the python-oracledb Thin and Thick modes.
6060

61-
.. attribute:: PoolParams.externalauth
62-
63-
This read-only attribute is a boolean that indicates whether the pool
64-
uses external authentication to connect to the database. The default value
65-
is False.
66-
67-
This attribute is only supported in the python-oracledb Thick mode.
68-
6961
.. attribute:: PoolParams.getmode
7062

7163
This read-write attribute is an integer that determines the behavior of

doc/src/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@
8484
# The style sheet to use for HTML and HTML Help pages. A file of that name
8585
# must exist either in Sphinx' static/ path, or in one of the custom paths
8686
# given in html_static_path.
87-
html_style = 'default.css'
87+
# html_style = 'default.css'
88+
89+
# The theme to use for readthedocs.
90+
html_theme = 'sphinx_rtd_theme'
8891

8992
# Add any paths that contain custom static files (such as style sheets) here,
9093
# relative to this directory. They are copied after the builtin static files,

0 commit comments

Comments
 (0)