To communicate any database with Python program, you required a connector which is nothing but the cx_Oracle module.
- To installing cx_Oracle :
- With this command, you can install the cx_Oracle package, but it is required to install the Oracle database first in your PC..
pip install cx_Oracle
- Now you need to use some modules for connection:
- Import specific database module- import cx_Oracle
- Connect() :- Now establish a connection between the Python program and the Oracle database by using connect() function.
connect = cx_Oracle.connect('username/password@localhost')
3. Cursor(): To execute SQL query and to provide a result, some special object required is nothing but cursor() object
cursor = cx_Oracle.cursor()
For more and clear cut information you can go through this https://datatofish.com/how-to-connect-python-to-an-oracle-database-using-cx_oracle/ I hope this will help.