from passlib.context import CryptContext try: pwd_context = CryptContext(schemes=["pbkdf2_sha256"], deprecated="auto") print("Context created") hash = pwd_context.hash("password123") print(f"Hash created: {hash}") verify = pwd_context.verify("password123", hash) print(f"Verify result: {verify}") except Exception as e: import traceback traceback.print_exc() print(f"Error: {e}")