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
from passvalidate import PasswordPolicy
# Use default policy
default_policy = PasswordPolicy()
result, issues = default_policy.check_password("passworda!")
if result:
print(result)
else:
print(issues)
# 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
)
result, issues = custom_policy.check_password("Your Custom Password 1!")
if result:
print(result)
else:
print(issues)
result, issues = custom_policy.check_password("Your Custom Password 1)")
if result:
print(result)
else:
print(issues)
# Get policy description
print(custom_policy.get_policy_description())
Development
To set up the development environment:
- Clone the repository
- Install Poetry if you haven't already: https://python-poetry.org/docs/#installation
- Run
poetry installto install dependencies - Run
poetry run pytestto run tests
Metadata
Release files for passvalidate 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| passvalidate-0.1.3.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| passvalidate-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.7 kB
Release files / passvalidate-0.1.3.tar.gz
| Download URL | passvalidate-0.1.3.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e39ebd662f22a5121a606b31c72c00f5e66ada1a140eca6a79af352a8f94215d
|
|
BLAKE2b-256 checksum How to use checksums |
6773b97f4108bad750ea188fd59967cb2dfa83e028e8104f61efa7cf72715d27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Darwin/23.1.0
|
Release files / passvalidate-0.1.3-py3-none-any.whl
| Download URL | passvalidate-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b99df869953952d9dc1a527fa45468eb49d9b2f40ffe4254c4fff1cea57bf422
|
|
BLAKE2b-256 checksum How to use checksums |
8417ebdfae9105ef52ee1e9912d5614c605df6e5100e6da26b90b900140e2d27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Darwin/23.1.0
|