kiafumi/lib/database.py

19 lines
381 B
Python
Raw Permalink Normal View History

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