TalentLensAI / database.py
Johnny
added app.py crewai.py database.py requirements.txt multi_agent folder
2600a8c
raw
history blame
514 Bytes
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)
)