Skip to main content

Passlib

PyPI Version PyPI Python Version

This is the official repository of Passlib, published on PyPI as passlib. It continues the original project at https://foss.heptapod.net/python-libs/passlib (unmaintained since its final release, 1.7.4, in 2020).

Passlib is a password hashing library for Python 3, which provides cross-platform implementations of over 30 password hashing algorithms, as well as a framework for managing existing password hashes. It's designed to be useful for a wide range of tasks, from verifying a hash found in /etc/shadow, to providing full-strength password hashing for multi-user application.

Versions 1.7.5 through 1.9.4 were published on PyPI as libpass; releases from 1.9.5 onward are published under passlib again.

  • See the documentation for details, installation instructions, and examples.
  • See the changelog for a description of what's new in Passlib.
  • Visit PyPI for the latest stable release.

Installation

pip install passlib

Available extras:

pip install passlib[argon2]
pip install passlib[bcrypt]
pip install passlib[totp]

Usage

A quick example of using passlib to integrate into a new application:

from passlib.context import CryptContext

context = CryptContext(schemes=["sha512_crypt"])

hash = context.hash("password")
# $6$rounds=656000$jFKvvPmUywlqjSs.$iNeK/OWVry7KThNyzR01xzqZzgk/VA75.sR4yXXblsPAoEugtdO3zn/O4VEG3Izp8l5.//lMGpuRCOqvKknHo1

# Verifying a password
is_valid = context.verify("password", hash)
# > True

For more details and an extended set of examples, see the full documentation

Metadata

Release files for passlib 1.9.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for passlib 1.9.6
File Size Uploaded Provenance Actions
passlib-1.9.6.tar.gz 770.0 kB With provenance Details for passlib-1.9.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for passlib 1.9.6
File Interpreter ABI Platform Actions
passlib-1.9.6-py3-none-any.whl Python 3 none any Details for passlib-1.9.6-py3-none-any.whl

Total release size: 1.1 MB

Release files / passlib-1.9.6.tar.gz

Download URL passlib-1.9.6.tar.gz
Size 770.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f9d440ac69d82781df69bc231b1f48b09f8578766c3baed45d2eb734ae320b46
BLAKE2b-256 checksum
How to use checksums
7238fed8eb065647a00f8bc603f6e55425776760a199a01e86672005da72bf10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / passlib-1.9.6-py3-none-any.whl

Download URL passlib-1.9.6-py3-none-any.whl
Size 307.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6eb8d453f04020d45c0e3c8004e9a9d3ee3a95a20a4f228cd0ad4ef8f4f04084
BLAKE2b-256 checksum
How to use checksums
58adcf298368ab5746a49777b1e398010302fd9f360cd542ac74f4ed7e7fedcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Security for passlib 1.9.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for passlib-1.9.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page