# 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()
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:
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
Raw data
{
"_id": null,
"home_page": "https://github.com/ygivenx/password-policy",
"name": "passvalidate",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "password, security, policy, check, auth, authentication",
"author": "Rohan Singh",
"author_email": "singhrohan@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/67/73/b97f4108bad750ea188fd59967cb2dfa83e028e8104f61efa7cf72715d27/passvalidate-0.1.3.tar.gz",
"platform": null,
"description": "# Configurable Password Policy Checker\n\nThis package provides a configurable password policy checker that allows you to set custom requirements for password strength.\n\n## Installation\n\nYou can install this package using pip:\n\n```\npip install passvalidate\n```\n\n## Usage\n\n```python\nfrom passvalidate import PasswordPolicy\n\n# Use default policy\ndefault_policy = PasswordPolicy()\nresult, issues = default_policy.check_password(\"passworda!\")\nif result:\n print(result)\nelse:\n print(issues)\n\n# Use custom policy\ncustom_policy = PasswordPolicy(\n min_length=10,\n min_uppercase=1,\n min_lowercase=1,\n min_digits=1,\n min_special=1,\n special_chars=\"!@#$%^&*\",\n allow_spaces=True\n)\nresult, issues = custom_policy.check_password(\"Your Custom Password 1!\")\nif result:\n print(result)\nelse:\n print(issues)\n\n\nresult, issues = custom_policy.check_password(\"Your Custom Password 1)\")\nif result:\n print(result)\nelse:\n print(issues)\n\n# Get policy description\nprint(custom_policy.get_policy_description())\n```\n\n## Development\n\nTo set up the development environment:\n\n1. Clone the repository\n2. Install Poetry if you haven't already: https://python-poetry.org/docs/#installation\n3. Run `poetry install` to install dependencies\n4. Run `poetry run pytest` to run tests",
"bugtrack_url": null,
"license": null,
"summary": "A configurable password policy checker",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/ygivenx/password-policy",
"Repository": "https://github.com/ygivenx/password-policy"
},
"split_keywords": [
"password",
" security",
" policy",
" check",
" auth",
" authentication"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8417ebdfae9105ef52ee1e9912d5614c605df6e5100e6da26b90b900140e2d27",
"md5": "19627da54feb07348bc8ad9249482e8c",
"sha256": "b99df869953952d9dc1a527fa45468eb49d9b2f40ffe4254c4fff1cea57bf422"
},
"downloads": -1,
"filename": "passvalidate-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "19627da54feb07348bc8ad9249482e8c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 15131,
"upload_time": "2024-08-26T01:08:16",
"upload_time_iso_8601": "2024-08-26T01:08:16.248048Z",
"url": "https://files.pythonhosted.org/packages/84/17/ebdfae9105ef52ee1e9912d5614c605df6e5100e6da26b90b900140e2d27/passvalidate-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6773b97f4108bad750ea188fd59967cb2dfa83e028e8104f61efa7cf72715d27",
"md5": "08761cd512e5e4f4858044968a9f7163",
"sha256": "e39ebd662f22a5121a606b31c72c00f5e66ada1a140eca6a79af352a8f94215d"
},
"downloads": -1,
"filename": "passvalidate-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "08761cd512e5e4f4858044968a9f7163",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 14568,
"upload_time": "2024-08-26T01:08:17",
"upload_time_iso_8601": "2024-08-26T01:08:17.669448Z",
"url": "https://files.pythonhosted.org/packages/67/73/b97f4108bad750ea188fd59967cb2dfa83e028e8104f61efa7cf72715d27/passvalidate-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-26 01:08:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ygivenx",
"github_project": "password-policy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "passvalidate"
}