mirror of
https://github.com/creyD/creyPY.git
synced 2026-04-16 21:30:30 +02:00
feat: added auth0 common module
This commit is contained in:
16
creyPY/helpers.py
Normal file
16
creyPY/helpers.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import random
|
||||
import string
|
||||
|
||||
|
||||
def create_random_password(length: int = 12) -> str:
|
||||
all_characters = string.ascii_letters + string.digits + string.punctuation
|
||||
|
||||
password = [
|
||||
random.choice(string.ascii_lowercase),
|
||||
random.choice(string.ascii_uppercase),
|
||||
random.choice(string.digits),
|
||||
random.choice(string.punctuation),
|
||||
]
|
||||
password += random.choices(all_characters, k=length - 4)
|
||||
random.shuffle(password)
|
||||
return "".join(password)
|
||||
Reference in New Issue
Block a user