Passlib requires Python 2 (>= 2.5) or Python 3. It is known to work with the following Python implementations:
Passlib should work with all operating systems and enviroments, as it contains builtin fallbacks for almost all OS-dependant features. Google App Engine is supported as well.
If either of these packages are installed, they will be used to provide support for the BCrypt hash algorithm. This is required if you want to handle BCrypt hashes, and your OS does not provide native BCrypt support via stdlib’s crypt (which includes pretty much all non-BSD systems).
If installed, M2Crypto will be used to accelerate some internal functions used by PBKDF2-based hashes, but it is not required even in that case.
To install from PyPi using pip:
pip install passlib
To install from PyPi using easy_install:
To install from the source using setup.py:
python setup.py install
Passlib contains a comprehensive set of unittests (about 38% of the total code), which provide nearly complete coverage, and verification of the hash algorithms using multiple external sources (if detected at runtime). All unit tests are contained within the passlib.tests subpackage, and are designed to be run using the Nose unit testing library.
Once Passlib and Nose have been installed, the main suite of tests may be run from the source directory:
nosetests --tests passlib/tests
To run the full test suite, which includes internal cross-checks and mock-testing of features not provided natively by the host OS:
PASSLIB_TEST_MODE="full" nosetests --tests passlib/tests
Tests may also be run via setup.py test or the included tox.ini file.
The latest copy of this documentation should always be available online at http://packages.python.org/passlib. If you wish to generate your own copy of the documentation, you will need to: