This tutorial shows you how to connect Python applications to Oracle Database using the python-oracledb interface. This interface lets you quickly develop applications that execute SQL or PL/SQL statements, allowing you to work with many data types including JSON. Your applications can also use Oracle's document storage SODA calls. Python-oracledb is the new name for Oracle's popular cx_Oracle driver. It conforms to the Python Database API v2.0 Specification with a considerable number of additions and a couple of exclusions.
The steps below show connecting to an on-premise database, but if you would like to use an Oracle Autonomous Database in Oracle Cloud instead (for example from the Always Free service), then see the Developing Python Applications for Oracle Autonomous Database tutorial.
If you do not already have access to an Oracle Database, then download and install Oracle Database XE 21c following these instructions.
More resources:
Alternatively, if you would like to use an Oracle Autonomous Database in Oracle Cloud instead (for example from the Always Free service), then see the Developing Python Applications for Oracle Autonomous Database tutorial.
Now you have completed this tutorial, you should continue with the full Python and Oracle Database Tutorial or Getting Started with Python and Oracle Database LiveLabs Tutorial to learn more about using python-oracledb.
More information and resources on using python-oracledb are available here.
Now you have completed this tutorial, you should continue with the full Python and Oracle Database Tutorial or Getting Started with Python and Oracle Database LiveLabs Tutorial to learn more about using python-oracledb.
More information and resources on using python-oracledb are available here.
Using a recent version of Linux such as Oracle Linux 8 is recommended.
Now you have completed this tutorial, you should continue with the full Python and Oracle Database Tutorial or Getting Started with Python and Oracle Database LiveLabs Tutorial to learn more about using python-oracledb.
More information and resources on using python-oracledb are available here.