test / bt-source /panel /class /webauthn /helpers /bytes_to_base64url.py
GGSheng's picture
feat: deploy Gemma 4 to hf space
08c964e verified
from base64 import urlsafe_b64encode
def bytes_to_base64url(val: bytes) -> str:
"""
Base64URL-encode the provided bytes
"""
return urlsafe_b64encode(val).decode("utf-8").rstrip("=")