Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Useful password hasher for django sites with drupal components

Project Description

Django-Drupal Password Hasher is a simple package created to hash Drupal 7 passwords with the prefix ‘drupal’.

Taken from

Installation typically looks like:

pip install Django-drupal-password-hasher

Typical usage in a python script looks like:

from djangodrupalpasswordhasher import drupal_password_hasher

hasher = DrupalPasswordHasher()
salt = hasher.salt()
password = "foobar"
encoded_password = hasher.encode(password, salt)

In a django project, change the settings file to look like:


And user authentication continues as normal:

from django.contrib.auth.models import User


user = User(first_name='foo', last_name='bar', email='')

Note: Django uses the first entry in the PASSWORD_HASHERS section of your settings file for user authentication by default. If you have other password hashers but want to use this one, make sure it is the first entry in the list.

Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Django-Drupal-Password-Hasher-0.1.1.tar.gz (15.9 kB) Copy SHA256 Checksum SHA256 Source Aug 5, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting