From fcc360620163d005986bb20e6792c7d8f71e7a3a Mon Sep 17 00:00:00 2001 From: Lukas Metzger Date: Fri, 22 May 2020 18:43:17 +0200 Subject: First version --- db.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db.py (limited to 'db.py') 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() + + + + + -- cgit v1.2.3-55-g7522