aurask/api/aurask/ids.py

15 lines
272 B
Python

"""Identifier and clock helpers."""
from __future__ import annotations
from datetime import UTC, datetime
from uuid import uuid4
def new_id(prefix: str) -> str:
return f"{prefix}_{uuid4().hex[:16]}"
def now_iso() -> str:
return datetime.now(UTC).isoformat()