feat(utils/PostgressConnect.py): Postgress connect Functional
Added Functions with connect to postgress db by link from enviroment
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import psycopg
|
||||
import os
|
||||
|
||||
def PSQLConnect():
|
||||
conn = psycopg.connect(os.getenv('POSTDRESS_CONNECTION'))
|
||||
return conn
|
||||
|
||||
def PSQLCursor(conn):
|
||||
cur = conn.cursor()
|
||||
return cur
|
||||
Reference in New Issue
Block a user