Registry / web-framework / django-password-validators

django-password-validators

JSON →
library1.7.3pypypiunverified

A collection of additional password validators for Django, including checks for length, complexity, common passwords, and more. Current version: 1.7.3. Release cadence is irregular; last update 2022.

pip install django-password-validators
INSTALL
IMPORT
SIG · DJANGO-PASSWORD-VA
D
django-password-validators
web-frameworkpythonv1.7.3
Install
3.4s avg
Import
Disk
66MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.7.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 66.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.4s · import 0.000s · 67MB
66MB installed
● package 66MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PasswordValidator
from django_password_validators import PasswordValidator
from password_validators import PasswordValidator

Register password validators in Django's settings.py.

# settings.py AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'password_validators.LengthValidator', 'OPTIONS': { 'min_length': 12, 'max_length': 128, } }, { 'NAME': 'password_validators.ComplexityValidator', 'OPTIONS': { 'length': 8, 'upper': 1, 'lower': 1, 'digit': 1, 'special': 1, } }, { 'NAME': 'password_validators.CommonPasswordValidator', 'OPTIONS': {} }, ]
Debug
Known issues
deprecatedThe 'UniqueValidator' and 'RepetitionValidator' were removed in version 1.1.0.
fix
Use 'ComplexityValidator' with appropriate options or custom validators.
affects: >=1.1.0
breakingDjango < 1.11 is not supported.
fix
Upgrade Django or use older version of the package.
affects: >=1.0.0
gotchaThe import path changed in version 1.0.0 from 'password_validators' to 'password_validators' (package name). Some tutorials show old import.
fix
Use 'from password_validators import ...' not 'from password_validators.validators import ...'.
affects: >=1.0.0
Upgrade
Version history
1.7.3latest on PyPI · released Dec 11, 2023
Audit
Dependencies
DjangorequiredCore dependency; requires Django >= 1.11.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
2
Resources
django-password-validators — pip install django-password-validators · libregistry