passwordler.password_strength
Module Contents
Functions
|
Tests the strength of a password. |
- passwordler.password_strength.password_strength(password)[source]
Tests the strength of a password.
This function tests the strength of a string to be used as a password. It determines password strength by assessing the length and the amount of capital letters, numbers and special characters used.
Parameters: password (str): A string that will be tested for strength if used as a password.
Returns: str: a rating of either ‘weak’, ‘good’ or ‘strong’
Example: >>> password_strength(‘baseball’) Output: ‘Your password is: Weak’ >>> password_strength(‘Baseball4life!’) Output: ‘Your password is: Strong’