Skip to main content

A Pwned Passwords implementation for Django sites.

Project description

CI status image

pwned-passwords-django provides helpers for working with the Pwned Passwords database from Have I Been Pwned in Django powered sites. Pwned Passwords is an extremely large database of passwords known to have been compromised through data breaches, and is useful as a tool for rejecting common or weak passwords.

There are three main components to this application:

All three use a secure, anonymized API which never transmits any password or its full hash to any third party.


The recommended configuration is to enable both the validator and the automatic password-checking middleware. To do this, make the following changes to your Django settings.

First, add the validator to your AUTH_PASSWORD_VALIDATORS list:

    # ... other password validators ...
        "NAME": "pwned_passwords_django.validators.PwnedPasswordsValidator",

Then, add the middleware to your MIDDLEWARE list:

    # .. other middlewares ...

For more details, consult the full documentation.

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

pwned_passwords_django-5.0.0.tar.gz (37.7 kB view hashes)

Uploaded Source

Built Distribution

pwned_passwords_django-5.0.0-py3-none-any.whl (12.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page