Skip to main content

pywnedPasswords

Freqtrade CI

This script uses the pwnedpasswords.com v2 api to check your password in a secure way (using the K-anonymity method)

The full Hash is never transmitted over the wire, only the first 5 characters. The comparison happens offline.

Special thanks to Troy Hunt (@troyhunt) for making this project possible.

Installation

pip install pywnedpasswords

Usage

Interactive

pywnedpasswords

Insert your password when asked.

the output will either be:

Password to check:
Found your password 47205 times.

or in case your password is secure

Password to check:
Your password did not appear in PwnedPasswords yet.

Passing the password as a command line argument

Discouraged - as it might leaves the password in your shell history

pywnedpasswords Passw0rd

Found your password 46980 times.

Piping the password

Discouraged - as it might leaves the password in your shell history

echo -n 'Passw0rd!' | pywnedpasswords 

Found your password 46980 times.

Reading passwords from a file

pywnedpasswords -f list-of-passwords.txt

Result is in the form: <line number>: <number of time the password was found>. 0 meaning the password is not known from Have I Been Pwned yet.

0: 7026
1: 45337
2: 376
3: 51
4: 27
5: 11
6: 136
7: 1
8: 6
9: 1
10: 0
11: 0
12: 0

Exit code

The pywnedpasswords exits with code 2 if the password is know of Have I Been Pwned already, and exit code 0 otherwise.

Release files for pywnedpasswords 0.67

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

Source distribution (sdist)

Source distribution for pywnedpasswords 0.67
File Size Uploaded
pywnedpasswords-0.67.tar.gz 5.0 kB Details

Built distribution (wheel)

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

Total release size: 11.2 kB

Release files / pywnedpasswords-0.67.tar.gz

Download URL pywnedpasswords-0.67.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3ce714edd64285f58f3e0cba92cd1fbeb29baa8856d49ba7bd6a6de68838aa59
BLAKE2b-256 checksum
How to use checksums
3861cc47915afc5cac99521bbf3cda6f77f240d413ea86b910824cc80d25f374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 13, 2026.

Transparency log

Release files / pywnedpasswords-0.67-py3-none-any.whl

Download URL pywnedpasswords-0.67-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8481bc3e57a3c1249ff9b40c3e2c34f6d8d89809b6f9a6ebea4f8647f9d61d17
BLAKE2b-256 checksum
How to use checksums
bb6654f14f4a39c60e46a85e19ffe767cfe1dcf6dea230fb472c4519f6ac22d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.67 This release

2 release files

0.66

2 release files

0.65

1 release file

0.63

1 release file

0.62

1 release file

0.61

2 release files

0.6

2 release files

0.5

1 release file

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

3 release files

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