Skip to content

Using the package.

YairT edited this page Aug 30, 2023 · 2 revisions

How to install the package?

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

How to create password?

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)

How to check password strength?

To check password strength, you need to use is_strong() command from the PasswordTool class:

print(PasswordTool.is_strong(password))

Clone this wiki locally