mirror of
https://18126008609:longquanjian123@gitee.com/feigong123/aurask.git
synced 2026-04-19 17:58:41 +00:00
15 lines
272 B
Python
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()
|