visionattend-api / test_db.py
Shevilll's picture
Implemented the first version of the application, handled the UI, face recognition, and database handling
5fde056
import psycopg
import os
from dotenv import load_dotenv
load_dotenv()
db_url = os.environ.get("DATABASE_URL")
conn = psycopg.connect(db_url)
print("Connected.", conn.closed)
with conn:
print("Inside with block")
print("After with block, closed:", conn.closed)