10 lines
233 B
Python
10 lines
233 B
Python
from __future__ import annotations
|
|
|
|
import secrets
|
|
import string
|
|
|
|
|
|
def random_password(length: int = 32) -> str:
|
|
alphabet = string.ascii_letters + string.digits
|
|
return "".join(secrets.choice(alphabet) for _ in range(length))
|