skillfed

pwdlib

Modern password hashing for Python

pwdlib v0.3.1 3.1M downloads/30d#2,742 on PyPI172
Permissive license Active released

What it is and what it does

pwdlib is a lightweight password hashing library for modern Python that wraps secure algorithms behind a simple, consistent API. It was created to address maintenance gaps in older libraries that will not work with Python 3.13 and later. The library deliberately keeps its scope narrow—it focuses on hashing and verifying passwords with modern, secure algorithms rather than attempting to support legacy algorithms.

You use it by creating a PasswordHash instance (typically via PasswordHash.recommended() to get sensible defaults), then calling hash() to create a password digest and verify() to check a plaintext password against a stored hash. It has a single runtime dependency (typing-extensions) and installs cleanly; optional algorithm backends are pulled in via pip extras.

Use it for:

  • Secure user authentication in web applications by hashing passwords at registration and verifying them at login.
  • Modernizing authentication layers in projects that need to support Python 3.13 and later.
  • Building password management systems that require modern, audited hashing algorithms without legacy algorithm support.
  • Prototyping authentication where a minimal, well-maintained password API is preferred over larger libraries.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a modern, easy-to-use wrapper for hashing and verifying passwords using secure algorithms, designed as a contemporary alternative to older password hashing libraries.

Yes, if you need straightforward password hashing for modern Python projects. The library is actively maintained, has no known vulnerabilities, installs cleanly, and supports Python 3.10–3.14. The Beta status is not a blocker given the narrow, focused scope. Install it if you want a simple, secure alternative; skip it only if you need legacy algorithm support or broader feature coverage.

Install

pwdlib on PyPI

pip

pip install pwdlib

uv

uv add pwdlib

poetry

poetry add pwdlib

Installing pwdlib

Before you install

Low friction install with a single runtime dependency (typing-extensions). The project is actively maintained with a recent release (2 days ago) and supports current Python versions (3.10–3.14), though it is still in Beta status.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute the package freely in both open-source and proprietary projects without restriction.

Quickstart

pip install pwdlib

from pwdlib import PasswordHash

password_hash = PasswordHash.recommended()
hash = password_hash.hash("herminetincture")
password_hash.verify("herminetincture", hash)

Requires Python 3.10 or later; optional algorithm backends must be installed via extras.

Verify before relying

  • Whether algorithm implementations are directly embedded or delegated to external libraries.
  • Performance characteristics and memory usage compared to alternatives.
  • Complete list of supported hashing algorithms beyond those mentioned in quickstart.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing-extensions
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 3,123,174/month — #2,742 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pwdlib-0.3.1-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: SecurityTopic :: Security :: Cryptography

Tags

password hashingsecure password verificationmodern password hashpython password securityhash and verify passwordsargon2 bcrypt
authenticationcryptography

More Security packages