from typing import AnyStr

from sqlalchemy.orm import Session

from src.db.models.admin import Profile


def get_profile(username: AnyStr, db: Session):
    profile = db.query(Profile).filter(Profile.email == username).first()
    return profile
