diff --git a/lib/database.py b/lib/database.py new file mode 100644 index 0000000..c39320e --- /dev/null +++ b/lib/database.py @@ -0,0 +1,18 @@ +import psycopg2 + +class Database: + def __init__(self, db, user, password, host, port, init): + if host == 0: + host = "localhost" + + if port == 0: + port = 5432 + + __conn = psycopg.connect(dbname=db, user=user, password=password, host=host, port=port) + cur = __conn.cursor + + def write(): + pass + + def read(): + pass