From 35f18853fc91bb41b1817aec9ce45d1201f22ed6 Mon Sep 17 00:00:00 2001 From: Kirill Date: Thu, 23 Oct 2025 23:00:00 +0300 Subject: [PATCH] feat(utils/PostgressConnect.py): Postgress connect Functional Added Functions with connect to postgress db by link from enviroment --- utils/PostgressConnect.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 utils/PostgressConnect.py diff --git a/utils/PostgressConnect.py b/utils/PostgressConnect.py new file mode 100644 index 0000000..6bc71a7 --- /dev/null +++ b/utils/PostgressConnect.py @@ -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