Adisri99 commited on
Commit
1ef7d85
·
verified ·
1 Parent(s): c77b4fe

Update backend/app/utils/ids.py

Browse files
Files changed (1) hide show
  1. backend/app/utils/ids.py +9 -3
backend/app/utils/ids.py CHANGED
@@ -1,3 +1,9 @@
1
- import uuid
2
- def make_id(prefix: str) -> str:
3
- return f"{prefix}_{uuid.uuid4().hex[:12]}"
 
 
 
 
 
 
 
1
+ import secrets
2
+
3
+
4
+ def make_dataset_id() -> str:
5
+ return f"ds_{secrets.token_hex(6)}"
6
+
7
+
8
+ def make_experiment_id() -> str:
9
+ return f"exp_{secrets.token_hex(6)}"