|
1 |
| -# Python-oracledb Examples |
| 1 | +# Python Examples |
2 | 2 |
|
3 |
| -This directory contains samples for python-oracledb, the Python driver for |
4 |
| -Oracle Database. |
| 3 | +This directory contains Oracle Database Python examples for: |
5 | 4 |
|
6 |
| -1. The schemas and SQL objects that are referenced in the samples can be |
7 |
| - created by running the Python script |
8 |
| - [create_schema.py](https://github.com/oracle-samples/oracle-db-examples/blob/main/python/create_schema.py). The |
9 |
| - script requires SYSDBA privileges and will prompt for these credentials as |
10 |
| - well as the names of the schemas and edition that will be created, unless a |
11 |
| - number of environment variables are set as documented in the Python script |
12 |
| - [sample_env.py](https://github.com/oracle-samples/oracle-db-examples/blob/main/python/sample_env.py). Run |
13 |
| - the script using the following command: |
14 |
| - |
15 |
| - python create_schema.py |
16 |
| - |
17 |
| -2. Run a Python script, for example: |
18 |
| - |
19 |
| - python query.py |
20 |
| - |
21 |
| -3. After running python-oracledb samples, the schemas and SQL objects can be |
22 |
| - dropped by running the Python script |
23 |
| - [drop_schema.py](https://github.com/oracle-samples/oracle-db-examples/blob/main/python/drop_schema.py). The |
24 |
| - script requires SYSDBA privileges and will prompt for these credentials as |
25 |
| - well as the names of the schemas and edition that will be dropped, unless a |
26 |
| - number of environment variables are set as documented in the Python script |
27 |
| - [sample_env.py](https://github.com/oracle-samples/oracle-db-examples/blob/main/python/sample_env.py). Run |
28 |
| - the script using the following command: |
29 |
| - |
30 |
| - python drop_schema.py |
31 |
| - |
32 |
| -## About python-oracledb |
33 |
| - |
34 |
| -- Python-oracledb is the new name for Oracle's popular Python cx_Oracle driver |
35 |
| - for Oracle Database. |
36 |
| - |
37 |
| -- Python-oracledb 1.0 is a new major release - the successor to cx_Oracle 8.3. |
38 |
| - |
39 |
| -- Python-oracledb is simple and small to install — under 15 MB (including |
40 |
| - Python package dependencies): `pip install oracledb` |
41 |
| - |
42 |
| -- Python-oracledb is now a Thin driver by default - it connects directly to |
43 |
| - Oracle Database without always needing Oracle Client libraries. |
44 |
| - |
45 |
| -- Python-oracledb has comprehensive functionality conforming to the Python |
46 |
| - Database API v2.0 Specification, with many additions and just a couple of |
47 |
| - exclusions. |
48 |
| - |
49 |
| -- A "Thick" mode can be optionally enabled by an application call. This mode |
50 |
| - has similar functionality to cx_Oracle and supports Oracle Database features |
51 |
| - that extend the Python DB API. To use this mode, the widely used and tested |
52 |
| - Oracle Client libraries such as from Oracle Instant Client must be installed |
53 |
| - separately. |
54 |
| - |
55 |
| -- Python-oracledb runs on many platforms including favorites like Linux, macOS |
56 |
| - and Windows. It can also be used on platforms where Oracle Client libraries |
57 |
| - are not available (such as Apple M1, Alpine Linux, or IoT devices), or where |
58 |
| - the client libraries are not easily installed (such as some cloud |
59 |
| - environments). |
60 |
| - |
61 |
| -## Resources |
62 |
| - |
63 |
| -Home page: [oracle.github.io/python-oracledb/](https://oracle.github.io/python-oracledb/) |
64 |
| - |
65 |
| -Quick start: [Quick Start python-oracledb Installation](https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html#quick-start-python-oracledb-installation) |
66 |
| - |
67 |
| -Documentation: [python-oracle.readthedocs.io/en/latest/index.html](https://python-oracle.readthedocs.io/en/latest/index.html) |
68 |
| - |
69 |
| -PyPI: [pypi.org/project/oracledb/](https://pypi.org/project/oracledb/) |
70 |
| - |
71 |
| -Source: [github.com/oracle/python-oracledb](https://github.com/oracle/python-oracledb) |
72 |
| - |
73 |
| -Upgrading: [Upgrading from cx_Oracle 8.3 to python-oracledb](https://python-oracledb.readthedocs.io/en/latest/user_guide/appendix_c.html#upgrading-from-cx-oracle-8-3-to-python-oracledb) |
| 5 | +- python-oracledb: The python-oracledb driver is a Python programming language |
| 6 | + extension module allowing Python programs to connect to Oracle |
| 7 | + Database. Python-oracledb is the new name for Oracle's popular cx_Oracle |
| 8 | + driver. |
0 commit comments