Installation¶
Supported Platforms¶
Passlib requires Python 3.9 or newer.
Passlib should work with all operating systems and environments, as it contains builtin fallbacks for almost all OS-dependent features.
Warning
Passlib 1.8 drops support for Python < 3.9, Jython and PyPy.
Starting with 1.10, versions that have reached EOL will no longer be supported.
Optional Libraries¶
-
bcryptIf installed, this will be used to handlepasslib.hash.bcryptandpasslib.hash.bcrypt_sha256hashes.
Usepip install passlib[bcrypt]to get the recommended bcrypt setup. -
argon2_cffiIfargon2_cffiis installed, it will be used to provide support for thepasslib.hash.argon2hash algorithm.
Usepip install passlib[argon2]to get the recommended argon2 setup. -
cryptographyIf installed, will be used to enable encryption of TOTP secrets for storage (seepasslib.totp).
Usepip install passlib[totp]to get the recommended TOTP setup.
Installation Instructions¶
To install from PyPI using pip:
pip install passlib
As noted above, you can ensure you have feature-specific extras installed via any of:
pip install passlib[argon2]
pip install passlib[bcrypt]
pip install passlib[totp]