Setting up the configuration files and refactoring

This commit is contained in:
2026-03-03 17:07:20 +02:00
parent 7eede1f99b
commit ba02095f32
9 changed files with 36 additions and 24 deletions
+8
View File
@@ -0,0 +1,8 @@
# app/utils/short_code.py
import string
import random
def generate_short_code(length: int = 6) -> str:
"""Generate a random alphanumeric short code."""
chars = string.ascii_letters + string.digits
return ''.join(random.choices(chars, k=length))