Skip to main content

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 Poetry:

poetry add password-policy

Usage

from password_policy import PasswordPolicy

# Use default policy
default_policy = PasswordPolicy()
result = default_policy.check_password("YourPassword123!")
if result:
    print(result)
else:
    print("Password meets all requirements")

# 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 = custom_policy.check_password("Your Custom Password 1!")
if result:
    print(result)
else:
    print("Password meets all custom requirements")

# 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

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.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

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

passvalidate-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: passvalidate-0.1.0.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

Hashes for passvalidate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fb41dc8f01b0403b65375d6a0d63fdab9f50dfee1f927de6b12c56576271c9a0
MD5 2554ff93ec64d3cc7e09c1adf53927be
BLAKE2b-256 ecad033e1dffeed5d2b3fe62598d12337027f2d752ae09f0dc5e9fc8836808d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: passvalidate-0.1.0-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

Hashes for passvalidate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bddd58b2283376a8af85b1e7ae2c10b65dcb01039cfdd0808875090bdb56b6e
MD5 c3e4181294b58a4d7a124a0958194156
BLAKE2b-256 12e951809365bc3e788f96f079c519be3e78b8a2c4b57ffe01a36f98e7ed5e48

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