Align text with README.md.

This commit is contained in:
Anthony Tuininga 2017-12-12 12:06:00 -07:00
parent a60c750721
commit 4ba3f9e011
1 changed files with 123 additions and 113 deletions

View File

@ -42,10 +42,130 @@ versions 3.4 and higher. You can use cx_Oracle with Oracle 11.2, 12.1
and 12.2 client libraries. Oracle's standard client-server version
interoperability allows connection to both older and newer databases.
For example Oracle 12.2 client libraries can connect to Oracle
Database 11.2 or later.</p>
Database 11.2.</p>
</div> <!-- /description -->
<div id="quickstart">
<h2>Getting Started</h2>
<ul>
<li><p>Install Python from <a href="https://www.python.org/" >python.org</a>.</p></li>
<li><p>Install cx_Oracle using <a href="http://cx-oracle.readthedocs.io/en/latest/installation.html#quick-start-cx-oracle-installation" >Quick Start cx_Oracle Installation</a>.</p></li>
<li><p>Download cx_Oracle <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/samples"
>samples</a> or create a script like the one below.</p></li>
<li><p>Locate your Oracle Database username and password, and the database
connection string. The connection string is commonly of the format
<code>hostname/servicename</code>, using the hostname where the database is
running, and the service name of the Oracle Database instance.</p>
<p>Substitute your username, password and connection string in the
code. For downloaded examples, put these in <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/samples/SampleEnv.py"
><code>SampleEnv.py</code></a> and <a
href="https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/SampleEnv.sql"
><code>SampleEnv.sql</code></a>, and then follow <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/samples/README.md"
><code>sample/README</code></a> to create the cx_Oracle sample schema.
SQL scripts to create Oracle Database's common sample schemas can be
found at <a href="https://github.com/oracle/db-sample-schemas"
>github.com/oracle/db-sample-schemas</a></p> </li>
<li><p>Run the Python script, for example:</p>
<pre>
python myscript.py
</pre>
</li>
</ul>
<h4><b>Sample cx_Oracle Script</b></h4>
<pre>
from __future__ import print_function
import cx_Oracle
# Connect as user "hr" with password "welcome" to the "oraclepdb" service running on this computer.
connection = cx_Oracle.connect("hr", "welcome", "localhost/orclpdb")
cursor = connection.cursor()
cursor.execute("""
SELECT first_name, last_name
FROM employees
WHERE department_id = :did AND employee_id > :eid""",
did = 50,
eid = 190)
for fname, lname in cursor:
print("Values:", fname, lname)
</pre>
</div> <!-- /quickstart -->
<div id="installation">
<h2>Installation</h2>
See <a
href="http://cx-oracle.readthedocs.io/en/latest/installation.html"
>cx_Oracle Installation</a> for detailed instructions.
</div> <!-- /installation -->
<div id="example">
<h2>Examples</h2>
See the <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/samples"
>samples</a> and the <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/test"
>test suite</a>. You can also look at the scripts in <a
href="https://github.com/anthony-tuininga/cx_OracleTools">cx_OracleTools</a>
and the modules in
<a href="https://github.com/anthony-tuininga/cx_PyOracleLib">cx_PyOracleLib</a>.
</div> <!-- /example -->
<div id="documentation">
<h2>Documentation</h2>
See the <a href="http://cx-oracle.readthedocs.io" >cx_Oracle
Documentation</a>.
</div> <!-- /documentation -->
<div id="changes">
<h2>Changes</h2>
See <a href="http://cx-oracle.readthedocs.io/en/latest/whatsnew.html"
>What's New</a> and the <a
href="http://cx-oracle.readthedocs.io/en/latest/releasenotes.html"
>Release Notes</a>.
</div> <!-- /changes -->
<div id="tests">
<h2>Tests</h2>
See the <a href="https://github.com/oracle/python-cx_Oracle/tree/master/test" >test suite</a>.
</div> <!-- /tests -->
<div id="help">
<h2>Help</h2>
<p>Issues and questions can be raised with the cx_Oracle community on
<a href="https://github.com/oracle/python-cx_Oracle/issues"
>GitHub</a> or on the <a
href="http://lists.sourceforge.net/lists/listinfo/cx-oracle-users"
>mailing list</a>.</p>
</div> <!-- /help -->
<div id="features">
<h2>Features</h2>
@ -122,6 +242,8 @@ database, including in LOGON triggers.</p></li>
<li><p>Database startup and shutdown.</p></li>
<li><p>Sharded Databases</p></li>
<li><p>Oracle Database High Availability Features, such as FAN
notifications and Transaction Guard support.</p></li>
@ -139,118 +261,6 @@ for more information.
</div> <!-- /features -->
<div id="installation">
<h2>Installation</h2>
See <a
href="http://cx-oracle.readthedocs.io/en/latest/installation.html"
>cx_Oracle Installation</a> for detailed instructions.
<ul>
<li>
<p>The simplest way to install cx_Oracle is with pip:</p>
<pre>
python -m pip install cx_Oracle --upgrade
</pre>
<p>If a binary wheel package is not available on <a
href="https://pypi.python.org/pypi/cx_Oracle" >PyPI</a> for your
platform, the source package will be used.</p>
<p>Note that if you download a source zip file directly from GitHub
then you will also need to download an <a
href="https://oracle.github.io/odpi" >ODPI-C</a> source zip file and
extract it inside the directory called "odpi". </p>
</li>
<li>
<p>After cx_Oracle is installed, Oracle client libraries must
also be installed and configured. These can be from Oracle Instant
Client, from a local Oracle Database, or from a full Oracle Client
installation.</p>
<p>If you need the libraries, download and unzip the <a
href="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
>Oracle Instant Client</a> 'Basic' package for your platform and set
PATH, LD_LIBRARY_PATH, or similar platform-specific library path
loading environment. See the <a
href="https://oracle.github.io/odpi/doc/installation.html"
>installation notes for ODPI-C</a> for help.</p>
<p>Versions 11.2, 12.1 and 12.2 of the Oracle Client libraries on Linux,
Windows and macOS are supported. Users have also reported success
with other platforms.</p>
</li>
</ul>
<p>If you require cx_Oracle 5.3, download a Windows installer from <a
href="https://pypi.python.org/pypi/cx_Oracle/5.3" >PyPI</a> or use
<code>python -m pip install cx-oracle==5.3</code> to install from
source.</p>
<p>Very old versions of cx_Oracle can be found in the files section at
<a
href="https://sourceforge.net/projects/cx-oracle/files/">Sourceforge.</a></p>
</div> <!-- /installation -->
<div id="example">
<h2>Example</h2>
<pre>
from __future__ import print_function
import cx_Oracle
connection = cx_Oracle.connect("hr", "welcome", "localhost/orclpdb")
cursor = connection.cursor()
cursor.execute("""
SELECT first_name, last_name
FROM employees
WHERE department_id = :did AND employee_id > :eid""",
did = 50,
eid = 190)
for fname, lname in cursor:
print("Values:", fname, lname)
</pre>
For more examples, please see the <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/samples"
>samples</a> and the <a
href="https://github.com/oracle/python-cx_Oracle/tree/master/test"
>test suite</a>. You can also look at the scripts in <a
href="https://github.com/anthony-tuininga/cx_OracleTools">cx_OracleTools</a>
and the modules in
<a href="https://github.com/anthony-tuininga/cx_PyOracleLib">cx_PyOracleLib</a>.
</div> <!-- /example -->
<div id="documentation">
<h2>Documentation</h2>
See the <a href="http://cx-oracle.readthedocs.io" >cx_Oracle
Documentation</a> and <a
href="http://cx-oracle.readthedocs.io/en/latest/releasenotes.html"
>Release Notes</a>.
</div> <!-- /documentation -->
<div id="help">
<h2>Help</h2>
<p>Issues and questions can be raised with the cx_Oracle community on
<a href="https://github.com/oracle/python-cx_Oracle/issues"
>GitHub</a> or on the <a
href="http://lists.sourceforge.net/lists/listinfo/cx-oracle-users"
>mailing list</a>.</p>
</div> <!-- /help -->
</div> <!-- /content -->
</div> <!-- /container -->
</body>