Skip to main content

libpass-next

Libpass is a rewrite of passlib library

Installation

pip install libpass-next

Usage

You can use individual hashers (argon2, bcrypt, pbkdf2, etc) individually:

from libpass.hashers.bcrypt import BcryptHasher

hasher = BcryptHasher()

hash = hasher.hash("password")
print(f"{hash=}")

is_valid = hasher.verify(hash=hash, secret="password")
print(f"{is_valid=}")

Or you can combine them into a single CryptContext if you need to support multiple password hashing schemes:

from libpass.context import CryptContext
from libpass.hashers.argon2 import Argon2Hasher
from libpass.hashers.bcrypt import BcryptHasher

context = CryptContext(
    schemes=[
        Argon2Hasher(),
        BcryptHasher(),
    ]
)

hash = context.hash("password")
# $argon2id$v=19$m=65536,t=3,p=4$cIRqyLJEF2IBc0ggxp4Kqw$W+PxOyErga7uHi/BOkyTsT6atZAfFuc1GEPwHOwyJMM
print(f"{hash=}")

is_valid = context.verify(hash=hash, secret="password")
print(f"{is_valid=}")  # True

old_hash = "$2b$12$eNeQerKdKhGj3IfERBdGPem7wUtlW3szwawvT5GIm/UNKxCuDnZku"
print(context.verify(hash=old_hash, secret="password"))  # True
print(context.needs_update(old_hash))  # True

Metadata

Release files for libpass-next 0.3.0

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

Source distribution (sdist)

Source distribution for libpass-next 0.3.0
File Size Uploaded Provenance Actions
libpass_next-0.3.0.tar.gz 15.6 kB Without provenance Details for libpass_next-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for libpass-next 0.3.0
File Interpreter ABI Platform Actions
libpass_next-0.3.0-py3-none-any.whl Python 3 none any Details for libpass_next-0.3.0-py3-none-any.whl

Total release size: 36.8 kB

Release files / libpass_next-0.3.0.tar.gz

Download URL libpass_next-0.3.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
477363d887d8737fec7202b5b71617bad4f7e5f19e672e74dffca3acd8ffbc37
BLAKE2b-256 checksum
How to use checksums
1fac05a541f73e4a244e7d5cb4997ddd2b7800ff0f2b805519b4029cb3007d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.19

Release files / libpass_next-0.3.0-py3-none-any.whl

Download URL libpass_next-0.3.0-py3-none-any.whl
Size 21.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
787813bd99462115b86a17e7ba427a9c8f066347c7027d9f06d4f78f67bd0fa0
BLAKE2b-256 checksum
How to use checksums
dd3327d1b1d6245dcd75f390c1460ee7ebbf68d79dc07829a546276108336e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.19

Security for libpass-next 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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