Skip to main content

A human friendly Python API wrapper for haveibeenpwned.com

Project description

build Python 3.8 License: LGPL v3 PyPI version Downloads Coverage Status CodeQL Quality Gate Status Security Rating

hibpwned

A friendly, low-level, fully functional, Python API wrapper for haveibeenpwned.com
All data sourced from https://haveibeenpwned.com
Visit https://haveibeenpwned.com/API/v3 to read the Acceptable Use Policy
for rules regarding acceptable usage of this API.

Installation

pip install hibpwned

Making calls to the HIBP API requires a key. You can purchase an HIBP-API-Key at
https://haveibeenpwned.com/API/Key

Usage

This module contains the class Pwned with functions:

search_all_breaches
all_breaches
single_breach
data_classes
search_pastes
search_password
search_hashes

All functions return a list of JSON objects containing relevent data, with the exception
of search_password and search_hashes, which returns an integer and a string object,
respectively.

See module DocStrings for function descriptions and parameters

Examples

import hibpwned

my_app = hibpwned.Pwned("test@example.com", "My_App", "My_API_Key")

my_breaches = my_app.search_all_breaches()
breaches = my_app.all_breaches()
adobe = my_app.single_breach("adobe")
data = my_app.data_classes()
my_pastes = my_app.search_pastes()
password = my_app.search_password("BadPassword")
my_hashes = my_app.search_hashes("21BD1")

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

hibpwned-1.3.6.tar.gz (11.2 kB view details)

Uploaded Source

File details

Details for the file hibpwned-1.3.6.tar.gz.

File metadata

  • Download URL: hibpwned-1.3.6.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for hibpwned-1.3.6.tar.gz
Algorithm Hash digest
SHA256 8e137631e349716a6c1746e77369ff3294d53b983dbb86f1aff18f6767d7addd
MD5 f3ea9f6667b1003c20ef2a42278d7ab9
BLAKE2b-256 79034502b0621636859323d4ff476cf6a45151cc3a8af2702df8629a339f523e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page