import secrets
from ulid import ULID


def new_id() -> str:
    """26-char ULID string, sortable by creation time."""
    return str(ULID())


def new_anon_id() -> str:
    alphabet = "23456789ABCDEFGHJKLMNPQRSTUVWXYZ"   # no 0/O/1/I
    return "S-" + "".join(secrets.choice(alphabet) for _ in range(6))
