Home Assistant Unofficial Reference 2024.12.1
utils.py
Go to the documentation of this file.
1 """Nightscout util functions."""
2 
3 from __future__ import annotations
4 
5 import hashlib
6 
7 
8 def hash_from_url(url: str) -> str:
9  """Hash url to create a unique ID."""
10  return hashlib.sha256(url.encode("utf-8")).hexdigest()