Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.3 - Connect with Oracle database

Is there a module for python 3.3 to connect with Oracle Databases? Which is the easiest to use? Something like the mysql module, only works with Oracle.

Preferably version 10g, but 11g will do just fine.

like image 980
aIKid Avatar asked Sep 27 '13 03:09

aIKid


1 Answers

There is: cx_Oracle

# Install --> You should have oracle installed otherwise exception will be raised

pip install cx_Oracle

import cx_Oracle

con = cx_Oracle.connect('pythonhol/[email protected]/orcl')
print con.version

con.close()

http://www.orafaq.com/wiki/Python

http://www.oracle.com/technetwork/articles/dsl/python-091105.html

like image 62
Joyfulgrind Avatar answered Oct 02 '22 16:10

Joyfulgrind