Skip to main content

Library for easily interfacing with Have I Been Pwned API v2

Project description

# `pwnedapi` (Have I Been Pwned)

A small utility class to leverage Troy Hunt's [_Have I Been Pwned API v2_]( and the _k-Anonymity_ model. Inspired by Phil Nash's Ruby gem [_pwned_](

## Installation

python install

## Usage

In its simplest form you'll only need to use two methods. Will probably add more if and when the API grows.

>>> from pwnedapi import Password
>>> password = Password("mysupersecretpassword")
>>> if password.is_pwned():
... print(f"Your password has been pwned {password.pwned_count} times.")
Your password has been pwned 2 times.

## Support

This is my first official Python package so if something is off feel free to send a PR. :fist:


- [ ] Add password change form validators to Django and Flask

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pwnedapi, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size pwnedapi-0.1.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page