import --> create tag distribution with/without batch

This commit is contained in:
2026-01-20 15:06:40 +03:30
parent 54047e625b
commit 81c272766e
6 changed files with 193 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import base64
import random
from datetime import datetime
from functools import lru_cache
@@ -56,3 +57,10 @@ def parse_birthdate(jalali_str):
gregorian_dt,
timezone.get_current_timezone()
)
def generate_unique_code(prefix: str):
now = timezone.now()
date_part = now.strftime("%Y%m%d")
rand_part = random.randint(100000, 999999)
return f"{prefix}{date_part}{rand_part}"