Files
pragativeer-v2/backend/find_amit.py

16 lines
524 B
Python

import asyncio
from sqlmodel import create_engine, select, Session
import sys
sys.path.append('backend')
import models
DATABASE_URL = "postgresql://pragativeer_admin:local_secure_password_2026@postgres:5432/pragativeer_prod"
engine = create_engine(DATABASE_URL)
with Session(engine) as session:
amit = session.exec(select(models.User).where(models.User.name == "Amit Kumar")).first()
if amit:
print(f"Amit Kumar: {amit.id}, {amit.tier}, {amit.target_exam}")
else:
print("Amit Kumar not found")