summaryrefslogtreecommitdiffstats
path: root/db.py
diff options
context:
space:
mode:
authorLukas Metzger2020-05-22 18:43:17 +0200
committerLukas Metzger2020-05-22 18:43:17 +0200
commitfcc360620163d005986bb20e6792c7d8f71e7a3a (patch)
tree89b10d6078447ec570e05423088287b817609e5d /db.py
downloadbwlp-statistics-fcc360620163d005986bb20e6792c7d8f71e7a3a.tar.gz
bwlp-statistics-fcc360620163d005986bb20e6792c7d8f71e7a3a.tar.xz
bwlp-statistics-fcc360620163d005986bb20e6792c7d8f71e7a3a.zip
First version
Diffstat (limited to 'db.py')
-rw-r--r--db.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/db.py b/db.py
new file mode 100644
index 0000000..583dfd5
--- /dev/null
+++ b/db.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+
+import pymysql
+
+def getConnection():
+ db = pymysql.connect('mysql.oebsrv.int.intranet', 'bwlehrpool', 'weav3Nu8ShaifaePh6aiqu6aetei7e', 'bwlehrpool', cursorclass=pymysql.cursors.DictCursor)
+ return db
+
+def closeConnection(db):
+ db.commit()
+ db.close()
+
+
+
+
+