people endpoints and super user events built
This commit is contained in:
19
Trash/validation_name_generator.py
Normal file
19
Trash/validation_name_generator.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import string
|
||||
import random
|
||||
import uuid
|
||||
|
||||
|
||||
def generate_validation_name(validation_type: str = "Request") -> str:
|
||||
"""
|
||||
Generate a validation name based on the current date and time.
|
||||
"""
|
||||
list_of_alphabet = list(string.ascii_lowercase)
|
||||
base_uuids = str(uuid.uuid4()) * 2
|
||||
result_string_list = []
|
||||
for base_uuid in base_uuids:
|
||||
if str(base_uuid).lower() not in list_of_alphabet:
|
||||
result_string_list.append(str(random.choice(list_of_alphabet)).upper())
|
||||
else:
|
||||
result_string_list.append(base_uuid.upper())
|
||||
result_string = "".join(result_string_list)
|
||||
return f"{validation_type.upper()}{result_string}"
|
||||
Reference in New Issue
Block a user