Skip to content

Commit 70cbc43

Browse files
Further nudge users towards python-oracledb.
1 parent bed2c03 commit 70cbc43

File tree

4 files changed

+47
-79
lines changed

4 files changed

+47
-79
lines changed

README.md

+23-73
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,33 @@
11
# Python cx_Oracle
22

3-
# News
3+
**cx_Oracle was obsoleted by
4+
[python-oracledb](https://oracle.github.io/python-oracledb/) in 2022.**
45

5-
**cx_Oracle has a major new release under a new name and homepage
6-
[python-oracledb](https://oracle.github.io/python-oracledb/).**
6+
Python-oracledb uses the same Python DB API as cx_Oracle, and has many new
7+
features.
78

8-
**The source code has moved to
9-
[github.com/oracle/python-oracledb](https://github.com/oracle/python-oracledb).**
9+
Install with:
1010

11-
New projects should install python-oracledb instead of cx_Oracle. Critical
12-
patches and binary packages for new Python releases may continue to be made in
13-
the cx_Oracle namespace for a limited time, subject to demand.
11+
```
12+
python -m pip install oracledb
13+
```
1414

15-
# About
15+
Usage is like:
1616

17-
cx_Oracle is a Python extension module that enables access to Oracle
18-
Database. It conforms to the [Python database API 2.0
19-
specification][1] with a considerable number of additions and a couple
20-
of exclusions. See the
21-
[homepage](https://oracle.github.io/python-cx_Oracle/index.html) for a
22-
feature list.
17+
```
18+
import getpass
19+
import oracledb
2320
24-
cx_Oracle 8.3 was tested with Python versions 3.6 through 3.10. You can
25-
use cx_Oracle with Oracle 11.2, 12c, 18c, 19c and 21c client libraries.
26-
Oracle's standard client-server version interoperability allows connection to
27-
both older and newer databases. For example Oracle 19c client libraries can
28-
connect to Oracle Database 11.2. Older versions of cx_Oracle may work with
29-
older versions of Python.
21+
un = 'scott'
22+
cs = 'localhost/orclpdb1'
23+
pw = getpass.getpass(f'Enter password for {un}@{cs}: ')
3024
31-
## Installation
25+
with oracledb.connect(user=un, password=pw, dsn=cs) as connection:
26+
with connection.cursor() as cursor:
27+
sql = 'select systimestamp from dual'
28+
for r in cursor.execute(sql):
29+
print(r)
30+
```
3231

33-
See [cx_Oracle Installation][15].
34-
35-
## Documentation
36-
37-
See the [cx_Oracle Documentation][2] and [Release Notes][14].
38-
39-
## Samples
40-
41-
See the [/samples][12] directory and the [tutorial][6]. You can also
42-
look at the scripts in [cx_OracleTools][7] and the modules in
43-
[cx_PyOracleLib][8].
44-
45-
## Help
46-
47-
Issues and questions can be raised with the cx_Oracle community on
48-
[GitHub][9] or on the [mailing list][5].
49-
50-
## Tests
51-
52-
See [/test][11].
53-
54-
## Contributing
55-
56-
The cx_Oracle driver was renamed to python-oracledb in May 2022. It has a new
57-
repository at https://github.com/oracle/python-oracledb
58-
59-
Please submit your contributions to the python-oracledb repository.
60-
61-
No further releases under the cx_Oracle namespace are planned.
62-
63-
## Security
64-
65-
Please consult the [security guide](./SECURITY.md) for our responsible security
66-
vulnerability disclosure process.
67-
68-
## License
69-
70-
cx_Oracle is licensed under a BSD license which you can find [here][3].
71-
72-
[1]: https://peps.python.org/pep-0249/
73-
[2]: https://cx-oracle.readthedocs.io
74-
[3]: https://github.com/oracle/python-cx_Oracle/blob/main/LICENSE.txt
75-
[5]: https://sourceforge.net/projects/cx-oracle/lists/cx-oracle-users
76-
[6]: https://github.com/oracle/python-cx_Oracle/tree/main/samples/tutorial
77-
[7]: http://cx-oracletools.sourceforge.net
78-
[8]: http://cx-pyoraclelib.sourceforge.net
79-
[9]: https://github.com/oracle/python-cx_Oracle/issues
80-
[11]: https://github.com/oracle/python-cx_Oracle/tree/main/test
81-
[12]: https://github.com/oracle/python-cx_Oracle/tree/main/samples
82-
[14]: https://cx-oracle.readthedocs.io/en/latest/release_notes.html
83-
[15]: https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html
32+
The source code for python-oracledb is at
33+
[github.com/oracle/python-oracledb](https://github.com/oracle/python-oracledb).

README.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
An enhanced cx_Oracle release is now under the python-oracledb namespace. See
2-
https://oracle.github.io/python-oracledb/index.html for how to install and use
3-
this updated driver.
1+
cx_Oracle was obsoleted by python-oracledb in 2022.
42

5-
For information about cx_Oracle itself, see
6-
https://oracle.github.io/python-cx_Oracle/index.html
3+
Python-oracledb uses the same Python DB API as cx_Oracle, and has many new
4+
features.
75

6+
See https://python-oracledb.readthedocs.io/en/latest/index.html for how to
7+
install and use this updated driver.

samples/tutorial/Python-and-Oracle-Database-Scripting-for-the-Future.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,18 @@
1111

1212
<h1>Python and Oracle Database Tutorial: Scripting for the Future</h1>
1313

14-
<img src="resources/community-py-200.png" alt="Python cx_Oracle logo" />
14+
<div class="announcement">
15+
16+
<p><strong>cx_Oracle has a major new release under a new name and
17+
homepage <a href="https://oracle.github.io/python-oracledb/"
18+
>python-oracledb</a>.</strong></p>
19+
20+
<p><strong>We recommend you use the <a
21+
href="https://oracle.github.io/python-oracledb/samples/tutorial/Python-and-Oracle-Database-The-New-Wave-of-Scripting.html"
22+
>new python-oracledb tutorial</a> instead of this cx_Oracle tutorial.</strong></p>
23+
24+
</div> <!-- announcement -->
25+
1526

1627
<h2>Contents</h2>
1728

samples/tutorial/resources/base.css

+7
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,10 @@ hr {
6060
pre {
6161
background: #E0E0E0;
6262
}
63+
64+
.announcement {
65+
margin-top: 30px;
66+
padding: 30px;
67+
padding-bottom: 15px;
68+
background-color: #F0CC71;
69+
}

0 commit comments

Comments
 (0)