Metadata-Version: 2.1
Name: passvalidate
Version: 0.1.1
Summary: A configurable password policy checker
Home-page: https://github.com/ygivenx/password-policy
Keywords: password,security,policy,check,auth,authentication
Author: Rohan Singh
Author-email: singhrohan@outlook.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Repository, https://github.com/ygivenx/password-policy
Description-Content-Type: text/markdown

# Configurable Password Policy Checker

This package provides a configurable password policy checker that allows you to set custom requirements for password strength.

## Installation

You can install this package using pip:

```
pip install passvalidate
```

## Usage

```python
from passvalidate import PasswordPolicy

# Use default policy
default_policy = PasswordPolicy()
is_valid, issues = default_policy.check_password("YourPassword123!")
if is_valid:
    print("Password meets all requirements")
else:
    print("Password issues:")
    for issue in issues:
        print(f"- {issue}")

# Use custom policy
custom_policy = PasswordPolicy(
    min_length=10,
    min_uppercase=1,
    min_lowercase=1,
    min_digits=1,
    min_special=1,
    special_chars="!@#$%^&*",
    allow_spaces=True
)
is_valid, issues = custom_policy.check_password("Your Custom Password 1!")
if is_valid:
    print("Password meets all custom requirements")
else:
    print("Password issues:")
    for issue in issues:
        print(f"- {issue}")

# Get policy description
print(custom_policy.get_policy_description())
```

## Development

To set up the development environment:

1. Clone the repository
2. Install Poetry if you haven't already: https://python-poetry.org/docs/#installation
3. Run `poetry install` to install dependencies
4. Run `poetry run pytest` to run tests
