diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-16 12:00:36 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-16 12:00:36 +0100 |
commit | b711f63c4087b3a9f5617af5b55afe93f414ddf5 (patch) | |
tree | a4eddad86c3024481b5bf64f6663d3143c0ab3d5 /api/db.py | |
parent | 64f53e70901069aab8344e24ebf0abe603f40ec3 (diff) |
working websocket connection
Diffstat (limited to 'api/db.py')
-rw-r--r-- | api/db.py | 8 |
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() |