summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2010-10-09 13:27:40 +0200
committerYuval Adam <yuv.adm@gmail.com>2010-10-09 13:27:40 +0200
commite47bae33a7dbca478f619d2369d6c9913195b1d7 (patch)
tree840be6cfef771e506992539290d7c22a1b7913e3
parentc7bcc643599e6da6bf647960bcb90026131c7867 (diff)
initial cx_Oracle connection up and running
-rw-r--r--.gitignore1
-rw-r--r--README2
-rw-r--r--dbconfig.py11
-rw-r--r--dbtest.py8
4 files changed, 21 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/README b/README
index 6f6a2f1..3158515 100644
--- a/README
+++ b/README
@@ -3,4 +3,4 @@ Ayalon Highway Data Analysis Project
Created by Yuval Adam (http://y3xz.com)
-Data by Ayalon Highways (http://ayalonhw.co.il/) \ No newline at end of file
+Data by Ayalon Highways (http://ayalonhw.co.il/)
diff --git a/dbconfig.py b/dbconfig.py
new file mode 100644
index 0000000..0dfaccb
--- /dev/null
+++ b/dbconfig.py
@@ -0,0 +1,11 @@
+# databse hostname or IP
+HOST = '127.0.0.1'
+
+# database name (instance id), use XE for express edition
+SID = 'XE'
+
+# databse username
+USER = 'user'
+
+# database password
+PASS = 'pass' \ No newline at end of file
diff --git a/dbtest.py b/dbtest.py
new file mode 100644
index 0000000..45d7e50
--- /dev/null
+++ b/dbtest.py
@@ -0,0 +1,8 @@
+import cx_Oracle
+import dbconfig
+
+connStr = u'%s/%s@%s' % (dbconfig.USER, dbconfig.PASS, dbconfig.SID)
+
+conn = cx_Oracle.connect(connStr)
+
+conn.close()