password_validator
This is a python port of npm package password-validator.
Install
pip install password-validator
Usage
from password_validator import PasswordValidator
# Create a schema
schema = PasswordValidator()
# Add properties to it
schema\
.min(8)\
.max(100)\
.has().uppercase()\
.has().lowercase()\
.has().digits()\
.has().no().spaces()\
# Validate against a password string
print(schema.validate('validPASS123'));
# => True
print(schema.validate('invalidPASS'));
# => False
Rules
Rules supported as of now are:
Rules |
Descriptions |
|---|---|
digits() |
specifies password must include digits |
letters() |
specifies password must include letters |
lowercase() |
specifies password must include lowercase letters |
uppercase() |
specifies password must include uppercase letters |
symbols() |
specifies password must include symbols |
spaces() |
specifies password must include spaces |
min(len) |
specifies minimum length |
max(len) |
specifies maximum length |
no([regex]) |
inverts the result of validations applied next |
has([regex]) |
inverts the effect of no() and applies a regex (optional) |
License
Metadata
Release files for password-validator 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| password_validator-1.0.tar.gz | 4.2 kB | Without provenance | Details for password_validator-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| password_validator-1.0-py3-none-any.whl | Python 3 | none | any | Details for password_validator-1.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / password_validator-1.0.tar.gz
| Download URL | password_validator-1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f12c1036b17c67fab607ad8003f43e73940793d7ab89bc7efcb2cd47c024533b
|
|
BLAKE2b-256 checksum How to use checksums |
1f603529640092041a8d46e9c88cdcd6d00f212b3e38e398d4c167eec549fc46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3
|
Release files / password_validator-1.0-py3-none-any.whl
| Download URL | password_validator-1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4de1758e15b4e9bdf32933fcc99ce89efcdd28566e26e130726bb4295dd0d44c
|
|
BLAKE2b-256 checksum How to use checksums |
b814b65256d9f801d172a815adf003892b034fe6dbadec7b9def4f45309a7a56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3
|
Security for password-validator 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.