A configurable password policy checker
Project description
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
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
passvalidate-0.1.2.tar.gz
(14.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file passvalidate-0.1.2.tar.gz.
File metadata
- Download URL: passvalidate-0.1.2.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a2f1cb3e4063fa566fbe551dec27700c42804cbefcb05fed7fe8802d45452f
|
|
| MD5 |
fcc5e1bbb4eafdefe6d057e014821426
|
|
| BLAKE2b-256 |
8cef2047f38edf75f4c043d55da0c24ca6facc862edc874a5fc7d8d63c8b7e49
|
File details
Details for the file passvalidate-0.1.2-py3-none-any.whl.
File metadata
- Download URL: passvalidate-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1779a5d98ec3b70ac9c7bc2909c89fc36beda0cfc48f1dcc98c4ac633ad3ae8
|
|
| MD5 |
f82f1cd82ea9d41ecfa6ed5a684003c4
|
|
| BLAKE2b-256 |
9c77f023ecc97476515474a88d16f6f68345f6d50a6747c715b8dd4f08179afa
|