-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.py
More file actions
26 lines (22 loc) · 725 Bytes
/
cli.py
File metadata and controls
26 lines (22 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import typer
from passwordGenerator import passwordGenerator
def passwordGeneratorCLI():
passwordLenght = typer.prompt("\nPassword lenght 📶")
upperCasesConfirm = typer.confirm("Uppercases 🔠")
lowerCasesConfirm = typer.confirm("Lowercases 🔡")
numbersConfirm = typer.confirm("Numbers 🔢")
specialCharactersConfirm = typer.confirm("Symbols 🔣")
print(
"\nPassword 🔑: "
+ "\033[92m"
+ passwordGenerator(
int(passwordLenght),
lowerCasesConfirm,
upperCasesConfirm,
numbersConfirm,
specialCharactersConfirm,
)
+ "\033"
)
if __name__ == "__main__":
typer.run(passwordGeneratorCLI)