# django-zxcvbn-password-validator
A translatable password validator for django, based on zxcvbn-python and available with
pip.
Professional support for django-zxcvbn-password-validator is available as part of the
[Tidelift Subscription](https://tidelift.com/subscription/pkg/pypi-django-zxcvbn-password-validator?utm_source=pypi-django-zxcvbn-password-validator&utm_medium=referral&utm_campaign=enterprise)
[](https://travis-ci.org/Pierre-Sassoulas/django-zxcvbn-password-validator)
[](https://coveralls.io/github/Pierre-Sassoulas/django-zxcvbn-password-validator?branch=master)
[](https://badge.fury.io/py/django-zxcvbn-password-validator)
## Translating the project
This project is available in multiple language. Your contribution would be very
appreciated if you know a language that is not yet available. See
[how to contribute](CONTRIBUTING.md)
### Language available
The software is developed in English. Other available languages are:
[](https://hosted.weblate.org/engage/django-zxcvbn-password-validator/)
- [x] Arabic thanks to Claude AI Assistant
- [x] Armenian thanks to Claude AI Assistant
- [x] Brazilian Portuguese thanks to [Andrés Martano](https://github.com/andresmrm/) and
Claude AI Assistant (corrections)
- [x] Chinese Simplified thanks to Claude AI Assistant
- [x] Czech thanks to [Michal Čihař](https://github.com/nijel/)
- [x] Dutch thanks to [Thom Wiggers](https://github.com/thomwiggers/)
- [x] English
- [x] French thanks to [Pierre Sassoulas](https://github.com/Pierre-Sassoulas/) and
[Lionel Sausin](https://github.com/ls-initiatives)
- [x] German thanks to Claude AI Assistant
- [x] Hausa thanks to Claude AI Assistant
- [x] Hindi thanks to Claude AI Assistant
- [x] Hungarian thanks to [RViktor](https://github.com/rviktor/)
- [x] Indonesian thanks to Claude AI Assistant
- [x] Italian thanks to Claude AI Assistant
- [x] Japanese thanks to Claude AI Assistant
- [x] Korean thanks to Claude AI Assistant
- [x] Polish thanks to Claude AI Assistant
- [x] Portuguese thanks to Claude AI Assistant
- [x] Russian thanks to Claude AI Assistant
- [x] Spanish thanks to Claude AI Assistant
- [x] Swahili thanks to Claude AI Assistant
- [x] Thai thanks to Claude AI Assistant
- [x] Turkish thanks to Claude AI Assistant
- [x] Ukrainian thanks to Claude AI Assistant
- [x] Vietnamese thanks to Claude AI Assistant
- [x] Yoruba thanks to Claude AI Assistant
## Creating a user with django-zxcvbn-password-validator
If the password is not strong enough, we provide errors explaining what you need to do :

The error message are translated to your target language (even the string given by
zxcvbn that are in english only) :

## How to use
Add `django-zxcvbn-password-validator` to your requirements and get it with pip. Then
everything happens in your settings file.
Add `'django_zxcvbn_password_validator'` in the `INSTALLED_APPS` :
```python
INSTALLED_APPS = [
# ...
"django_zxcvbn_password_validator"
]
```
Modify `AUTH_PASSWORD_VALIDATORS` :
```python
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django_zxcvbn_password_validator.ZxcvbnPasswordValidator",
},
# ...
]
```
You could choose to use zxcvbn alone, but I personally still use Django's
`UserAttributeSimilarityValidator`, because there seems to be still be some problem with
it integrating user information with zxcvbn (as of june 2018).
Finally, you can set the `PASSWORD_MINIMAL_STRENGTH` to your liking (default is 2),
every password scoring lower than this number will be rejected :
```python
# 0 too guessable: risky password. (guesses < 10^3)
# 1 very guessable: protection from throttled online attacks.
# (guesses < 10^6)
# 2 somewhat guessable: protection from unthrottled online attacks.
# (guesses < 10^8)
# 3 safely unguessable: moderate protection from offline slow-hash scenario.
# (guesses < 10^10)
# 4 very unguessable: strong protection from offline slow-hash scenario.
# (guesses >= 10^10)
PASSWORD_MINIMAL_STRENGTH = 0 if DEBUG else 4
```
Raw data
{
"_id": null,
"home_page": null,
"name": "django-zxcvbn-password-validator",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": null,
"keywords": "django, password-validator, zxcvbn",
"author": null,
"author_email": "Pierre SASSOULAS <pierre.sassoulas@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/78/23/91534cedd2235f3db9b41fc29e438a6cd2c5024de7f386c329b91f27f4d0/django_zxcvbn_password_validator-1.5.1.tar.gz",
"platform": null,
"description": "# django-zxcvbn-password-validator\n\nA translatable password validator for django, based on zxcvbn-python and available with\npip.\n\nProfessional support for django-zxcvbn-password-validator is available as part of the\n[Tidelift Subscription](https://tidelift.com/subscription/pkg/pypi-django-zxcvbn-password-validator?utm_source=pypi-django-zxcvbn-password-validator&utm_medium=referral&utm_campaign=enterprise)\n\n[](https://travis-ci.org/Pierre-Sassoulas/django-zxcvbn-password-validator)\n[](https://coveralls.io/github/Pierre-Sassoulas/django-zxcvbn-password-validator?branch=master)\n[](https://badge.fury.io/py/django-zxcvbn-password-validator)\n\n## Translating the project\n\nThis project is available in multiple language. Your contribution would be very\nappreciated if you know a language that is not yet available. See\n[how to contribute](CONTRIBUTING.md)\n\n### Language available\n\nThe software is developed in English. Other available languages are:\n\n[](https://hosted.weblate.org/engage/django-zxcvbn-password-validator/)\n\n- [x] Arabic thanks to Claude AI Assistant\n- [x] Armenian thanks to Claude AI Assistant\n- [x] Brazilian Portuguese thanks to [Andr\u00e9s Martano](https://github.com/andresmrm/) and\n Claude AI Assistant (corrections)\n- [x] Chinese Simplified thanks to Claude AI Assistant\n- [x] Czech thanks to [Michal \u010ciha\u0159](https://github.com/nijel/)\n- [x] Dutch thanks to [Thom Wiggers](https://github.com/thomwiggers/)\n- [x] English\n- [x] French thanks to [Pierre Sassoulas](https://github.com/Pierre-Sassoulas/) and\n [Lionel Sausin](https://github.com/ls-initiatives)\n- [x] German thanks to Claude AI Assistant\n- [x] Hausa thanks to Claude AI Assistant\n- [x] Hindi thanks to Claude AI Assistant\n- [x] Hungarian thanks to [RViktor](https://github.com/rviktor/)\n- [x] Indonesian thanks to Claude AI Assistant\n- [x] Italian thanks to Claude AI Assistant\n- [x] Japanese thanks to Claude AI Assistant\n- [x] Korean thanks to Claude AI Assistant\n- [x] Polish thanks to Claude AI Assistant\n- [x] Portuguese thanks to Claude AI Assistant\n- [x] Russian thanks to Claude AI Assistant\n- [x] Spanish thanks to Claude AI Assistant\n- [x] Swahili thanks to Claude AI Assistant\n- [x] Thai thanks to Claude AI Assistant\n- [x] Turkish thanks to Claude AI Assistant\n- [x] Ukrainian thanks to Claude AI Assistant\n- [x] Vietnamese thanks to Claude AI Assistant\n- [x] Yoruba thanks to Claude AI Assistant\n\n## Creating a user with django-zxcvbn-password-validator\n\nIf the password is not strong enough, we provide errors explaining what you need to do :\n\n\n\nThe error message are translated to your target language (even the string given by\nzxcvbn that are in english only) :\n\n\n\n## How to use\n\nAdd `django-zxcvbn-password-validator` to your requirements and get it with pip. Then\neverything happens in your settings file.\n\nAdd `'django_zxcvbn_password_validator'` in the `INSTALLED_APPS` :\n\n```python\nINSTALLED_APPS = [\n # ...\n \"django_zxcvbn_password_validator\"\n]\n```\n\nModify `AUTH_PASSWORD_VALIDATORS` :\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n {\n \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n },\n {\n \"NAME\": \"django_zxcvbn_password_validator.ZxcvbnPasswordValidator\",\n },\n # ...\n]\n```\n\nYou could choose to use zxcvbn alone, but I personally still use Django's\n`UserAttributeSimilarityValidator`, because there seems to be still be some problem with\nit integrating user information with zxcvbn (as of june 2018).\n\nFinally, you can set the `PASSWORD_MINIMAL_STRENGTH` to your liking (default is 2),\nevery password scoring lower than this number will be rejected :\n\n```python\n# 0 too guessable: risky password. (guesses < 10^3)\n# 1 very guessable: protection from throttled online attacks.\n# (guesses < 10^6)\n# 2 somewhat guessable: protection from unthrottled online attacks.\n# (guesses < 10^8)\n# 3 safely unguessable: moderate protection from offline slow-hash scenario.\n# (guesses < 10^10)\n# 4 very unguessable: strong protection from offline slow-hash scenario.\n# (guesses >= 10^10)\nPASSWORD_MINIMAL_STRENGTH = 0 if DEBUG else 4\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A translatable password validator for django, based on zxcvbn-python.",
"version": "1.5.1",
"project_urls": {
"Bug Tracker": "https://github.com/Pierre-Sassoulas/django-zxcvbn-password-validator/issues",
"Source Code": "https://github.com/Pierre-Sassoulas/django-zxcvbn-password-validator"
},
"split_keywords": [
"django",
" password-validator",
" zxcvbn"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bada529729badd62660200f5c70a2ca89e42486d1015cffd6ab5cea313718fa5",
"md5": "d4a9a99a5250a662440660f692c40030",
"sha256": "a7e5437b134ce22fdc8235ccbdc4dfd19efab8f12a77e2974196ea5c231cbc85"
},
"downloads": -1,
"filename": "django_zxcvbn_password_validator-1.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d4a9a99a5250a662440660f692c40030",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0",
"size": 149488,
"upload_time": "2025-08-27T05:19:44",
"upload_time_iso_8601": "2025-08-27T05:19:44.528582Z",
"url": "https://files.pythonhosted.org/packages/ba/da/529729badd62660200f5c70a2ca89e42486d1015cffd6ab5cea313718fa5/django_zxcvbn_password_validator-1.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "782391534cedd2235f3db9b41fc29e438a6cd2c5024de7f386c329b91f27f4d0",
"md5": "5165466b2cac8cd1bc5c2b8193c46d1e",
"sha256": "e92861d000c09703ed5cff14d96ee37b3aea6cd50e9b892ae43f98e00a5a50bb"
},
"downloads": -1,
"filename": "django_zxcvbn_password_validator-1.5.1.tar.gz",
"has_sig": false,
"md5_digest": "5165466b2cac8cd1bc5c2b8193c46d1e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 58543,
"upload_time": "2025-08-27T05:19:45",
"upload_time_iso_8601": "2025-08-27T05:19:45.934647Z",
"url": "https://files.pythonhosted.org/packages/78/23/91534cedd2235f3db9b41fc29e438a6cd2c5024de7f386c329b91f27f4d0/django_zxcvbn_password_validator-1.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-27 05:19:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Pierre-Sassoulas",
"github_project": "django-zxcvbn-password-validator",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-zxcvbn-password-validator"
}