aboutsummaryrefslogtreecommitdiff
path: root/api/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/db.py')
-rw-r--r--api/db.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/api/db.py b/api/db.py
new file mode 100644
index 0000000..5448331
--- /dev/null
+++ b/api/db.py
@@ -0,0 +1,8 @@
+# dit bestand is hier om circular imports te vermijden
+import os
+import sqlite3
+
+db_path = os.path.abspath("database/database.db")
+connection = sqlite3.connect(db_path, check_same_thread=False)
+#! ^^^ Dit is onveilig en goede multithreading support moet nog geïmplementeerd worden
+cursor = connection.cursor()