Further nudge users towards python-oracledb.

This commit is contained in:
Anthony Tuininga 2025-03-26 20:19:34 -06:00
parent bed2c037f9
commit 70cbc43752
4 changed files with 47 additions and 79 deletions

View File

@ -1,83 +1,33 @@
# Python cx_Oracle
# News
**cx_Oracle was obsoleted by
[python-oracledb](https://oracle.github.io/python-oracledb/) in 2022.**
**cx_Oracle has a major new release under a new name and homepage
[python-oracledb](https://oracle.github.io/python-oracledb/).**
Python-oracledb uses the same Python DB API as cx_Oracle, and has many new
features.
**The source code has moved to
[github.com/oracle/python-oracledb](https://github.com/oracle/python-oracledb).**
Install with:
New projects should install python-oracledb instead of cx_Oracle. Critical
patches and binary packages for new Python releases may continue to be made in
the cx_Oracle namespace for a limited time, subject to demand.
```
python -m pip install oracledb
```
# About
Usage is like:
cx_Oracle is a Python extension module that enables access to Oracle
Database. It conforms to the [Python database API 2.0
specification][1] with a considerable number of additions and a couple
of exclusions. See the
[homepage](https://oracle.github.io/python-cx_Oracle/index.html) for a
feature list.
```
import getpass
import oracledb
cx_Oracle 8.3 was tested with Python versions 3.6 through 3.10. You can
use cx_Oracle with Oracle 11.2, 12c, 18c, 19c and 21c client libraries.
Oracle's standard client-server version interoperability allows connection to
both older and newer databases. For example Oracle 19c client libraries can
connect to Oracle Database 11.2. Older versions of cx_Oracle may work with
older versions of Python.
un = 'scott'
cs = 'localhost/orclpdb1'
pw = getpass.getpass(f'Enter password for {un}@{cs}: ')
## Installation
with oracledb.connect(user=un, password=pw, dsn=cs) as connection:
with connection.cursor() as cursor:
sql = 'select systimestamp from dual'
for r in cursor.execute(sql):
print(r)
```
See [cx_Oracle Installation][15].
## Documentation
See the [cx_Oracle Documentation][2] and [Release Notes][14].
## Samples
See the [/samples][12] directory and the [tutorial][6]. You can also
look at the scripts in [cx_OracleTools][7] and the modules in
[cx_PyOracleLib][8].
## Help
Issues and questions can be raised with the cx_Oracle community on
[GitHub][9] or on the [mailing list][5].
## Tests
See [/test][11].
## Contributing
The cx_Oracle driver was renamed to python-oracledb in May 2022. It has a new
repository at https://github.com/oracle/python-oracledb
Please submit your contributions to the python-oracledb repository.
No further releases under the cx_Oracle namespace are planned.
## Security
Please consult the [security guide](./SECURITY.md) for our responsible security
vulnerability disclosure process.
## License
cx_Oracle is licensed under a BSD license which you can find [here][3].
[1]: https://peps.python.org/pep-0249/
[2]: https://cx-oracle.readthedocs.io
[3]: https://github.com/oracle/python-cx_Oracle/blob/main/LICENSE.txt
[5]: https://sourceforge.net/projects/cx-oracle/lists/cx-oracle-users
[6]: https://github.com/oracle/python-cx_Oracle/tree/main/samples/tutorial
[7]: http://cx-oracletools.sourceforge.net
[8]: http://cx-pyoraclelib.sourceforge.net
[9]: https://github.com/oracle/python-cx_Oracle/issues
[11]: https://github.com/oracle/python-cx_Oracle/tree/main/test
[12]: https://github.com/oracle/python-cx_Oracle/tree/main/samples
[14]: https://cx-oracle.readthedocs.io/en/latest/release_notes.html
[15]: https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html
The source code for python-oracledb is at
[github.com/oracle/python-oracledb](https://github.com/oracle/python-oracledb).

View File

@ -1,7 +1,7 @@
An enhanced cx_Oracle release is now under the python-oracledb namespace. See
https://oracle.github.io/python-oracledb/index.html for how to install and use
this updated driver.
cx_Oracle was obsoleted by python-oracledb in 2022.
For information about cx_Oracle itself, see
https://oracle.github.io/python-cx_Oracle/index.html
Python-oracledb uses the same Python DB API as cx_Oracle, and has many new
features.
See https://python-oracledb.readthedocs.io/en/latest/index.html for how to
install and use this updated driver.

View File

@ -11,7 +11,18 @@
<h1>Python and Oracle Database Tutorial: Scripting for the Future</h1>
<img src="resources/community-py-200.png" alt="Python cx_Oracle logo" />
<div class="announcement">
<p><strong>cx_Oracle has a major new release under a new name and
homepage <a href="https://oracle.github.io/python-oracledb/"
>python-oracledb</a>.</strong></p>
<p><strong>We recommend you use the <a
href="https://oracle.github.io/python-oracledb/samples/tutorial/Python-and-Oracle-Database-The-New-Wave-of-Scripting.html"
>new python-oracledb tutorial</a> instead of this cx_Oracle tutorial.</strong></p>
</div> <!-- announcement -->
<h2>Contents</h2>

View File

@ -60,3 +60,10 @@ hr {
pre {
background: #E0E0E0;
}
.announcement {
margin-top: 30px;
padding: 30px;
padding-bottom: 15px;
background-color: #F0CC71;
}