Files
klangkiste/box/core/identity.py
T
2026-01-12 15:25:34 +00:00

16 lines
345 B
Python

"""Box identity generation and management."""
from __future__ import annotations
import secrets
import string
PREFIX = "klangkiste-"
ALPHABET = string.ascii_lowercase + string.digits
SUFFIX_LENGTH = 10
def generate_box_id() -> str:
suffix = "".join(secrets.choice(ALPHABET) for _ in range(SUFFIX_LENGTH))
return f"{PREFIX}{suffix}"