Depends on your SW architecture and your intention to be ready to move to another platform.
cx_Oracle is dependent on the Oracle client. Thus, you are sure that the Oracle client is following a known path. Even if you do not want to use the Oracle client for a regular session, you can use it to pre-test the server.
On linux / unix, you can run the following subprocess code:
sqlplus user/ pasword@INSTANCE <<< "quit"| grep "Oracle Database"| head -n 1
Grep and other processing can be done in your code and on Windows, this is necessary. By the code, you will receive the version of Oracle, and you will find out whether the connection information is correctly specified.
user2004287
source share