refactor(chart): Move functions to separate files or folders to improve code structure.

This commit is contained in:
Данил 2024-12-14 23:22:44 +03:00
parent 110effaeb2
commit 85acbbb16c
5 changed files with 177 additions and 175 deletions

View file

@ -0,0 +1,11 @@
import datetime
import random
import string
async def generate_unique_name(currency_pair: str, date: datetime) -> str:
date_str = date.strftime("%Y%m%d")
random_suffix = ''.join(random.choices(string.ascii_uppercase + string.digits, k=6))
unique_name = f"{currency_pair}_{date_str}_{random_suffix}"
return unique_name