Skip to content

Commit d5c0b82

Browse files
committedFeb 13, 2025
Added namespace package oracledb.plugins to support extending the
capability of python-oracledb. Added plugins for Oracle Cloud Infrastructure Storage and Microsoft Azure App Configuration configuration providers.
1 parent 732e7d6 commit d5c0b82

File tree

11 files changed

+1201
-94
lines changed

11 files changed

+1201
-94
lines changed
 

‎MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ include *.txt
55
recursive-include src/oracledb *.pxd
66
recursive-include src/oracledb *.pxi
77
recursive-include src/oracledb *.pyx
8+
recursive-include src/oracledb/plugins *.py
89
recursive-include src/oracledb/impl/thick/odpi *.c
910
recursive-include src/oracledb/impl/thick/odpi *.h
1011
prune src/oracledb/impl/thick/odpi/test

‎doc/src/api_manual/module.rst

+51
Original file line numberDiff line numberDiff line change
@@ -4234,3 +4234,54 @@ See :ref:`exception` for usage information.
42344234
Boolean attribute representing whether the error is recoverable or not.
42354235
This is False in all cases unless both Oracle Database 12.1 (or later) and
42364236
Oracle Client 12.1 (or later) are being used.
4237+
4238+
.. _oracledbplugins:
4239+
4240+
Oracledb Plugins
4241+
================
4242+
4243+
The `namespace package <https://packaging.python.org/en/latest/guides/
4244+
packaging-namespace-packages/#native-namespace-packages>`__
4245+
``oracledb.plugins`` can contain plugins to extend the capability of
4246+
python-oracledb. See :ref:`customplugins`. Note that the namespace
4247+
``oracledb.plugins.ldap_support`` is reserved for future use by the
4248+
python-oracledb project.
4249+
4250+
.. versionadded:: 3.0.0
4251+
4252+
.. _configociplugin:
4253+
4254+
Oracle Cloud Infrastructure (OCI) Object Storage Configuration Provider Plugin
4255+
------------------------------------------------------------------------------
4256+
4257+
``oracledb.plugins.oci_config_provider`` is a plugin that provides access to
4258+
the configuration information stored in the :ref:`OCI Object Storage
4259+
<ociobjstorage>` configuration provider. Importing this plugin defines and
4260+
:meth:`registers <oracledb.register_protocol()>` the hook function that
4261+
handles :ref:`OCI Object Storage connection strings <connstringoci>` prefixed
4262+
with ``config-oci``. The hook function parses this connection string, and
4263+
extracts the authentication details and URI details from the connection
4264+
string. Using the information, the hook function accesses the configuration
4265+
information in OCI Object Storage, which python-oracledb will use to connect
4266+
to Oracle Database. See :ref:`importconfigociplugin` for more information.
4267+
4268+
.. versionadded:: 3.0.0
4269+
4270+
.. _configazureplugin:
4271+
4272+
Azure App Configuration Provider Plugin
4273+
---------------------------------------
4274+
4275+
``oracledb.plugins.azure_config_provider`` is a plugin that provides access to
4276+
the configuration information stored in :ref:`Azure App Configuration
4277+
<azureappconfig>` provider. Importing this plugin defines and
4278+
:meth:`registers <oracledb.register_protocol()>` the hook function that
4279+
handles :ref:`Azure App Configuration connection string <connstringazure>`
4280+
prefixed with ``config-azure``. The hook function parses this connection
4281+
string, and extracts the authentication details and URI details from the
4282+
connection string. Using the information, the hook function accesses the
4283+
configuration information in Azure App Configuration, which python-oracledb
4284+
will use to connect to Oracle Database. See :ref:`importconfigazureplugin`
4285+
for more information.
4286+
4287+
.. versionadded:: 3.0.0

‎doc/src/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ User Guide
3939
user_guide/asyncio.rst
4040
user_guide/exception_handling.rst
4141
user_guide/tracing.rst
42+
user_guide/extending.rst
4243
user_guide/troubleshooting.rst
4344
user_guide/appendix_a.rst
4445
user_guide/appendix_b.rst

‎doc/src/release_notes.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ oracledb 3.0.0 (TBD)
1717
Thin Mode Changes
1818
+++++++++++++++++
1919

20+
#) Added namespace package :ref:`oracledb.plugins <plugins>` for plugins that
21+
can be used to extend the capability of python-oracledb.
2022
#) Perform TLS server matching in python-oracledb instead of the Python SSL
2123
library to allow alternate names to be checked
2224
(`issue 415 <https://github.com/oracle/python-oracledb/issues/415>`__).
@@ -56,8 +58,9 @@ Common Changes
5658
#) Added support for :ref:`naming and caching connection pools
5759
<connpoolcache>` during creation, and retrieving them later from the
5860
python-oracledb pool cache with :meth:`oracledb.get_pool()`.
59-
#) Added Centralized Configuration Provider support for :ref:`file-based
60-
configurations <builtinconfigproviders>`.
61+
#) Added :ref:`Centralized Configuration Provider <configurationproviders>`
62+
support for Oracle Cloud Infrastructure Object Storage, Microsoft Azure App
63+
Configuration, and file-based configurations.
6164
#) Added :meth:`oracledb.register_password_type()` to allow users to register
6265
a function that will be called when a password is supplied as a dictionary
6366
containing the key "type".

0 commit comments

Comments
 (0)
Please sign in to comment.