Files
SQLBot/backend/common/utils/random.py

7 lines
184 B
Python
Raw Normal View History

2025-09-08 16:35:57 +08:00
import secrets
import string
def get_random_string(length=16):
alphabet = string.ascii_letters + string.digits
return ''.join(secrets.choice(alphabet) for _ in range(length))