import psycopg2 from sqlalchemy import create_engine DATABASE_URL = "postgresql://user:password@localhost:5432/resumes_db" engine = create_engine(DATABASE_URL) def save_resume_data(resume_text, parsed_details, ranking_score): """Save parsed resume details and ranking score to DB""" with engine.connect() as conn: conn.execute( "INSERT INTO resumes (resume_text, parsed_details, ranking_score) VALUES (%s, %s, %s)", (resume_text, parsed_details, ranking_score) )