import hashlib import getpass def generate_password_hash(): """Generate a SHA-256 hash for a password""" password = getpass.getpass("Enter the password you want to hash: ") if not password: print("Password cannot be empty") return hashed = hashlib.sha256(password.encode()).hexdigest() print("\nAdd the following line to your .env file:") print(f"PASSWORD={hashed}") if __name__ == "__main__": generate_password_hash()