Library to query HaveIBeenPwned.com with handling for CloudFlare anti-bot
Project description
pyhaveibeenpwned (https://shanewilliamscott.com)
Authors:
Shane Scott
About pyhaveibeenpwned
Python library to query HaveIBeenPwned.com with handling for CloudFlare anti-bot.
Installation
pip3 install pyhaveibeenpwned
Usage
from pyhaveibeenpwned import PyHaveIBeenPwned, PyHaveIBeenPwnedError
client = PyHaveIBeenPwned(
api_key="your-hibp-api-key",
user_agent="my-company-app/1.0",
)
try:
breaches = client.get_account_breaches("user@example.com")
except PyHaveIBeenPwnedError as exc:
print(f"API error: {exc}")
Note: HaveIBeenPwned requires both a valid API key and a descriptive User-Agent header for authenticated endpoints. The helper automatically adds these headers to every request.
Deprecations
Release 0.2 moves all public methods to snake_case to comply with PEP 8. Legacy camelCase helpers remain available for now and emit DeprecationWarning; update your code to use the new names before the next major release.
Credits
Based on fork from https://github.com/GoVanguard/pyExploitDb by Shane Scott.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhaveibeenpwned-0.2.1.tar.gz.
File metadata
- Download URL: pyhaveibeenpwned-0.2.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b66433679165063b69ba094cfb69ce78c60d3bf4fe8e576c0a360cd1e3a4eccb
|
|
| MD5 |
74776500a13b9951f1665f6b5f141fec
|
|
| BLAKE2b-256 |
f8848d1215fc71d8c25273338e7fc6f6b94257151ef782f5e68ef1ac5b71cbee
|
File details
Details for the file pyhaveibeenpwned-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pyhaveibeenpwned-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8cddd44bea6e65fd258f8ee27a7bd0aad6f83358b882f7fab47cfe289ba708e
|
|
| MD5 |
07a22cf015ee665a66f105eb60b315b7
|
|
| BLAKE2b-256 |
255167deb019341553c90b57ce0b4b2fb584c752f7b8f2939d7ec921e0507bef
|