Setting up the configuration files and refactoring
This commit is contained in:
@@ -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))
|
||||
Reference in New Issue
Block a user