Skip to content

Commit 552fcfb

Browse files
Bump license year; simplify README and avoid duplication.
1 parent 9cb2ef8 commit 552fcfb

File tree

5 files changed

+63
-169
lines changed

5 files changed

+63
-169
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
LICENSE AGREEMENT FOR CX_ORACLE
22

3-
Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved.
3+
Copyright 2016, 2018, Oracle and/or its affiliates. All rights reserved.
44

55
Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
66

README.md

Lines changed: 19 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# Python cx_Oracle interface to Oracle Database
1+
# cx_Oracle version 6.2
22

3-
cx_Oracle is a Python extension module that enables access to Oracle Database.
4-
It conforms to the [Python database API 2.0 specification][1] with a
5-
considerable number of additions and a couple of exclusions.
6-
7-
cx_Oracle is licensed under a BSD license which you can find [here][3].
3+
cx_Oracle is a Python extension module that enables access to Oracle
4+
Database. It conforms to the [Python database API 2.0
5+
specification][1] with a considerable number of additions and a couple
6+
of exclusions. See the
7+
[homepage](https://oracle.github.io/python-cx_Oracle/index.html) for a
8+
feature list.
89

910
cx_Oracle 6 has been tested with Python version 2.7, and with versions
1011
3.4 and higher. You can use cx_Oracle with Oracle 11.2, 12.1 and 12.2
@@ -13,181 +14,46 @@ interoperability allows connection to both older and newer databases,
1314
for example Oracle 12.2 client libraries can connect to Oracle
1415
Database 11.2.
1516

16-
## Getting Started
17-
18-
Install Python from [python.org][4].
19-
20-
Install cx_Oracle using [Quick Start cx_Oracle Installation][6].
21-
22-
Download cx_Oracle [samples][12] or create a script like the one
23-
below.
24-
25-
Locate your Oracle Database username and password, and the database
26-
connection string. The connection string is commonly of the format
27-
`hostname/servicename`, using the hostname where the database is
28-
running, and the service name of the Oracle Database instance.
29-
30-
Substitute your username, password and connection string in the code.
31-
For downloaded examples, put these in [`SampleEnv.py`][13] and
32-
[`SampleEnv.sql`][10], and then follow [`sample/README`][16] to create
33-
the cx_Oracle sample schema. SQL scripts to create Oracle Database's
34-
common sample schemas can be found at
35-
[github.com/oracle/db-sample-schemas][17].
36-
37-
Run the Python script, for example:
38-
39-
```
40-
python myscript.py
41-
```
42-
43-
### Sample cx_Oracle Script
44-
45-
```python
46-
# myscript.py
47-
48-
from __future__ import print_function
49-
50-
import cx_Oracle
51-
52-
# Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer.
53-
connection = cx_Oracle.connect("hr", "welcome", "localhost/orclpdb")
54-
55-
cursor = connection.cursor()
56-
cursor.execute("""
57-
SELECT first_name, last_name
58-
FROM employees
59-
WHERE department_id = :did AND employee_id > :eid""",
60-
did = 50,
61-
eid = 190)
62-
for fname, lname in cursor:
63-
print("Values:", fname, lname)
64-
```
65-
6617
## Installation
6718

6819
See [cx_Oracle Installation][15].
6920

70-
## Examples
71-
72-
See the [samples][12] directory and the [test suite][11]. You can also
73-
look at the scripts in [cx_OracleTools][7] and the modules in
74-
[cx_PyOracleLib][8].
75-
7621
## Documentation
7722

78-
See the [cx_Oracle Documentation][2].
23+
See the [cx_Oracle Documentation][2] and [Release Notes][14].
7924

80-
## Changes
25+
## Samples
8126

82-
See [What's New][18] and the [Release Notes][14].
83-
84-
## Tests
85-
86-
See the [test suite][11].
27+
See the [/samples][12] directory and the [tutorial][6]. You can also
28+
look at the scripts in [cx_OracleTools][7] and the modules in
29+
[cx_PyOracleLib][8].
8730

8831
## Help
8932

9033
Issues and questions can be raised with the cx_Oracle community on
9134
[GitHub][9] or on the [mailing list][5].
9235

93-
## Features
94-
95-
- Easily installed from PyPI.
96-
97-
- Support for Python 2 and 3.
98-
99-
- Support for Oracle Client 11.2, 12.1 and 12.2. Oracle's standard
100-
cross-version interoperability, allows easy upgrades and
101-
connectivity to different Oracle Database versions.
102-
103-
- Connect to Oracle Database 9.2, 10, 11 or 12 (depending on the
104-
Oracle Client version used).
105-
106-
- SQL and PL/SQL Execution. The underlying Oracle Client libraries
107-
have significant optimizations including compressed fetch,
108-
pre-fetching, client and server result set caching, and statement
109-
caching with auto-tuning.
110-
111-
- Full use of Oracle Network Service infrastructure, including
112-
encrypted network traffic and security features.
113-
114-
- Extensive Oracle data type support, including large object support (CLOB
115-
and BLOB).
116-
117-
- Direct binding to SQL objects. One great use case is binding Python
118-
objects to Oracle Spatial SDO objects.
119-
120-
- Array operations for efficient INSERT and UPDATEs.
121-
122-
- Array row counts and batch error handling for array operations.
123-
124-
- Fetching of large result sets.
125-
126-
- REF CURSOR support.
127-
128-
- Support for scrollable cursors. Go back and forth through your query
129-
results.
130-
131-
- Fetch PL/SQL Implicit Results. Easily return query results from
132-
PL/SQL.
133-
134-
- Row Prefetching. Efficient use of the network.
135-
136-
- Client Result Caching. Improve performance of frequently executed
137-
look-up statements.
138-
139-
- Support for Advanced Queuing. Use database notifications to build
140-
micro-service applications.
141-
142-
- Continuous Query Notification. Get notified when data changes.
143-
144-
- Support for Edition Based Redefinition. Easily switch applications
145-
to use updated PL/SQL logic.
146-
147-
- Support for setting application context during the creation of a
148-
connection, making application metadata more accessible to the
149-
database, including in LOGON triggers.
150-
151-
- End-to-end monitoring and tracing.
152-
153-
- Transaction Management.
154-
155-
- Session Pooling.
156-
157-
- Database Resident Connection Pooling (DRCP).
158-
159-
- Privileged Connections.
36+
## Tests
16037

161-
- External Authentication.
38+
See [/test][11].
16239

163-
- Database startup and shutdown.
40+
## Contributing
16441

165-
- Sharded Databases
42+
See [CONTRIBUTING](https://github.com/oracle/python-cx_Oracle/blob/master/CONTRIBUTING.md)
16643

167-
- Oracle Database High Availability Features, such as FAN notifications and Transaction Guard support.
44+
## License
16845

169-
**DB API specification exclusions**: The time data type is not
170-
supported by Oracle and is therefore not implemented. The method
171-
`cursor.nextset()` is not implemented either as the DB API specification assumes
172-
an implementation of cursors that does not fit well with Oracle's implementation
173-
of cursors and implicit results. See the method `cursor.getimplicitresults()`
174-
for more information.
46+
cx_Oracle is licensed under a BSD license which you can find [here][3].
17547

17648
[1]: https://www.python.org/dev/peps/pep-0249
17749
[2]: http://cx-oracle.readthedocs.io
17850
[3]: https://github.com/oracle/python-cx_Oracle/blob/master/LICENSE.txt
179-
[4]: https://www.python.org/downloads/
18051
[5]: http://lists.sourceforge.net/lists/listinfo/cx-oracle-users
181-
[6]: http://cx-oracle.readthedocs.io/en/latest/installation.html#quick-start-cx-oracle-installation
52+
[6]: https://github.com/oracle/python-cx_Oracle/tree/master/samples/tutorial
18253
[7]: http://cx-oracletools.sourceforge.net
18354
[8]: http://cx-pyoraclelib.sourceforge.net
18455
[9]: https://github.com/oracle/python-cx_Oracle/issues
185-
[10]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/SampleEnv.sql
18656
[11]: https://github.com/oracle/python-cx_Oracle/tree/master/test
18757
[12]: https://github.com/oracle/python-cx_Oracle/tree/master/samples
188-
[13]: https://github.com/oracle/python-cx_Oracle/tree/master/samples/SampleEnv.py
18958
[14]: http://cx-oracle.readthedocs.io/en/latest/releasenotes.html
19059
[15]: http://cx-oracle.readthedocs.io/en/latest/installation.html
191-
[16]: https://github.com/oracle/python-cx_Oracle/tree/master/samples/README.md
192-
[17]: https://github.com/oracle/db-sample-schemas
193-
[18]: http://cx-oracle.readthedocs.io/en/latest/whatsnew.html

doc/src/installation.rst

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,48 @@ Quick Start cx_Oracle Installation
6969
10.2 or greater. Version 11.2 client libraries can connect to Oracle
7070
Database 9.2 or greater.
7171

72-
- After installation, your Python applications will be able to connect
73-
to your database. The database can be on the same machine as
74-
Python, or on a remote machine. cx_Oracle does not install or
75-
create a database.
72+
The database abstraction layer in cx_Oracle is `ODPI-C
73+
<https://github.com/oracle/odpi>`__, which means that the `ODPI-C
74+
installation instructions
75+
<https://oracle.github.io/odpi/doc/installation.html>`__ can be useful
76+
to review.
7677

77-
You will need to know user credentials and the connection string for
78-
the database.
78+
- Create a script like the one below::
7979

80-
You can learn how to use cx_Oracle from the API documentation and
81-
`samples
82-
<https://github.com/oracle/python-cx_Oracle/blob/master/samples>`__.
80+
# myscript.py
8381

84-
If you run into trouble, check out the section on `Troubleshooting`_.
82+
from __future__ import print_function
8583

86-
The database abstraction layer in cx_Oracle is `ODPI-C
87-
<https://github.com/oracle/odpi>`__, which means that the `ODPI-C
88-
installation instructions
89-
<https://oracle.github.io/odpi/doc/installation.html>`__ can be useful
90-
to review.
84+
import cx_Oracle
85+
86+
# Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer.
87+
connection = cx_Oracle.connect("hr", "welcome", "localhost/orclpdb")
88+
89+
cursor = connection.cursor()
90+
cursor.execute("""
91+
SELECT first_name, last_name
92+
FROM employees
93+
WHERE department_id = :did AND employee_id > :eid""",
94+
did = 50,
95+
eid = 190)
96+
for fname, lname in cursor:
97+
print("Values:", fname, lname)
98+
99+
Locate your Oracle Database username and password, and the database
100+
connection string. The connection string is commonly of the format
101+
``hostname/servicename``, using the hostname where the database is
102+
running, and the service name of the Oracle Database instance.
103+
104+
Substitute your username, password and connection string in the
105+
code. Run the Python script, for example::
106+
107+
python myscript.py
108+
109+
You can learn how to use cx_Oracle from the :ref:`API documentation <module>`
110+
and `samples
111+
<https://github.com/oracle/python-cx_Oracle/blob/master/samples>`__.
112+
113+
If you run into installation trouble, check out the section on `Troubleshooting`_.
91114

92115

93116
Oracle Client and Oracle Database Interoperability

doc/src/releasenotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ Version 6.0.1 (August 2017)
202202
Version 6.0 (August 2017)
203203
-------------------------
204204

205+
See :ref:`What's New <whatsnew60>` for a summary of the changes between
206+
cx_Oracle 5.3 and cx_Oracle 6.0.
207+
205208
#) Update to `ODPI-C 2.0 <https://oracle.github.io/odpi/doc/releasenotes.html
206209
#version-2-0-august-14-2017>`__.
207210

doc/src/whatsnew.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
What's New
55
**********
66

7+
.. _whatsnew60:
8+
79
cx_Oracle 6.0
810
=============
911

0 commit comments

Comments
 (0)