-
Notifications
You must be signed in to change notification settings - Fork 0
Using the package.
YairT edited this page Aug 30, 2023
·
2 revisions
First, make sure you have Python and Pip installed. Then install the package like this:
pip install passwordtools-yt
Or, you can build from the source. The easy way to build from source will work with Git. Make sure you have Git installed, then run the following command:
git clone https://github.com/Yair-T/passwordtools.git
Go to the folder where you downloaded the project, and execute the following command:
python3 -m build
To create password in Python with the 'passwordtools-yt' package, We will import the package first:
from passwordtools import PasswordTool
After that, to generate the password we will execute the generate() command from the PasswordTool class:
password: str = PasswordTool.generate()
And print:
print(password)
To check password strength, you need to use is_strong() command from the PasswordTool class:
print(PasswordTool.is_strong(password))
© All rights reserved to Yair-T and use according to Mit license. see the LICENSE file for details.