lab6_files

This commit is contained in:
caramelteawithmint
2026-12-04 19:16:26 +03:00
parent 20afc2c790
commit 4f21a985f7
38 changed files with 2115 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import os
import secrets
from .config import get_settings
def _build_instance_id() -> str:
s = get_settings()
if s.instance_id:
return s.instance_id
# Короткий случайный alias; при желании можно задать INSTANCE_ID в env.
return "api-" + secrets.token_hex(6)
INSTANCE_ID: str = _build_instance_id()