1. akoha
  2. python-digest


Clone wiki

python-digest / Home


This library was written to aid in the implementation of HTTP Digest Authentication for Python web frameworks.

It provides everything required to generate HTTP Digest challenges and to authenticate HTTP Digest authentication requests from clients, as well as the reverse.


  1. Check it out from bitbucket or download a pre-built egg from pypi.


See django_digest.HttpDigestAuthenticator for an example of integrating python-digest with a web framework.


python-digest uses buildout so setting up a development and testing environment is easy:

erik-wrights-macbook-pro:~ erikwright$ hg clone http://bitbucket.org/akoha/python-digest
real URL is http://bitbucket.org/akoha/python-digest/
destination directory: python-digest
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 11 changes to 11 files
updating working directory
11 files updated, 0 files merged, 0 files removed, 0 files unresolved
erik-wrights-macbook-pro:~ erikwright$ cd python-digest
erik-wrights-macbook-pro:python-digest erikwright$ /usr/bin/python bootstrap.py 
Creating directory '/Users/erikwright/python-digest/bin'.
Creating directory '/Users/erikwright/python-digest/parts'.
Creating directory '/Users/erikwright/python-digest/eggs'.
Creating directory '/Users/erikwright/python-digest/develop-eggs'.
Generated script '/Users/erikwright/python-digest/bin/buildout'.
erik-wrights-macbook-pro:python-digest erikwright$ ./bin/buildout 
Develop: '/Users/erikwright/python-digest/.'
Getting distribution for 'zc.recipe.testrunner'.
zip_safe flag not set; analyzing archive contents...
Got zc.recipe.testrunner 1.2.0.
Getting distribution for 'zc.recipe.egg>=1.2.0'.
Got zc.recipe.egg 1.2.2.
Getting distribution for 'zope.testing>=3.6.0'.
warning: no files found matching 'sampletests' under directory 'src'
Got zope.testing 3.8.6.
Getting distribution for 'zope.exceptions'.
Got zope.exceptions 3.5.2.
Installing test.
Getting distribution for 'zope.interface'.
Got zope.interface 3.5.3.
Generated script '/Users/erikwright/python-digest/bin/test'.
Installing python.
Generated interpreter '/Users/erikwright/python-digest/bin/python'.
erik-wrights-macbook-pro:python-digest erikwright$ ./bin/test
/Users/erikwright/python-digest/eggs/zope.testing-3.8.6-py2.5.egg/zope/testing/testrunner/debug.py:23: DeprecationWarning: zope.testing.doctest is deprecated in favour of the Python standard library doctest module
  from zope.testing import doctest
Running zope.testing.testrunner.layer.UnitTests tests:
  Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
  Ran 12 tests with 0 failures and 0 errors in 0.002 seconds.
Tearing down left over layers:
  Tear down zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
erik-wrights-macbook-pro:python-digest erikwright$