Skip to main content

Add your description here

Project description

Password Analyzer

Overview

Password Analyzer is a Python library designed to evaluate the strength of passwords, validate them against a set of customizable rules, and provide actionable feedback to improve password security.

Key features include:

  • Validating password length and complexity.
  • Checking for weak and prohibited patterns.
  • Scoring passwords based on configurable character weights.
  • Suggesting improvements for weak passwords.
  • Customizable analyzer options.

Table of Contents


Installation

[!NOTE] I'm planning to publish Password Strength Analyzer on PyPI

Clone the repository:

$ git clone https://github.com/password-strength-analyzer.git .

Install dependencies:

$ pip install -r requirements.txt

Usage

Basic Example

from getpass import getpass

from password_analyzer.password_analyzer import PasswordAnalyzer
password = getpass("Password: ")

password_analyzer = PasswordAnalyzer(password=password)

print(password_analyzer.get_password_review())

Features

Password Strength Review

Generate a detailed review of the password's compliance with configured thresholds:

review = analyzer.get_password_review()
print(review)

Example Output:

Password: My_Very_Secure@Pssw0rd reaches the 0 threshold and is Good

Password Suggestions

Provide actionable feedback to improve password strength:

suggested_improvements = analyzer.suggest_improvements()
print(suggested_improvements)

Example Output:

- Increase your password length to be minimum 8 characters long.
- Your password isn't as good as it can be. Strengthen it using special characters like !, $, etc.

Customization

Analyzer Options

Adjust rules for password validation using the AnalyzerOptions class:

from password_analyzer.analyzer_options import AnalyzerOptions
from password_analyzer.analyzer import PasswordAnalyzer

options = AnalyzerOptions(
    required_length=12,
    maximum_length=64,
    score_threshold=15,
    prohibited_characters=["!", "#"],
    weak_passwords=["password", "123456"]
)

password = "P@ssw0rd"
analyzer = PasswordAnalyzer(password=password, options=options)

License

This project is licensed under the MIT License. See the LICENSE file for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

password_analyzer-0.1.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

password_analyzer-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file password_analyzer-0.1.0.tar.gz.

File metadata

  • Download URL: password_analyzer-0.1.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for password_analyzer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d679e04bc13a1c775e6cd55548593fe0d51759ebd54ffec7b857caf5060a9446
MD5 b70f7a0aea4c7ad68a05f583d01c208a
BLAKE2b-256 e97ad2557fc84e98b4d3abb50e8a5ad4e08914f5a2249108317b93645720f04f

See more details on using hashes here.

File details

Details for the file password_analyzer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for password_analyzer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e56421907a205ed8069b0f34c21fc9ee34f54e4c00f394ee624de3d6234f348
MD5 67ae96ced505e0d7ecd3760d96a34806
BLAKE2b-256 1db19524d620a78fea1a84d73acf4caaac7e76e6742d15efab62c04824e3ca4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page