# Have I Been Pwned?
Python interface to Have I Been Pwned API
## What is Have I Been Pwned?
[Have I Been Pwned](https://haveibeenpwned.com/) is a free resource to quickly assess if an account or domain has been compromised or “pwned” in a data breach. By aggregating the data here the project helps victims be aware of account compromises, and highlights the severity of the risks of Internet-wide attacks. For more information on who, what, and why, click [here](https://haveibeenpwned.com/About).
## Dependencies
` requests gevent `
## Setup
This library runs on Python3.x+
To install, run:
` $ pip install hibp `
## To run
You can query breach data on individual accounts/domains as well as data on full breaches. Each service request object contains a response attribute that holds the raw data output in JSON format. To perform a query, just setup a service request object, and then execute:
`python >> req = HIBP.get_account_breaches("pegasos1") >> req.execute() >> req.response `
If you want to query on multiple accounts or domains at once, you can use the AsyncHIBP object, which performs queries concurrently via gevent.
`python >> names = ['adobe','ashleymadison', 'myspace'] >> breaches = [HIBP.get_breach(x) for x in names] >> async_reqs = AsyncHIBP().map(breaches) >> [async_req.response for async_req in async_reqs] `
In addition to a canonical map method, AsyncHIBP also supports the imap method, which returns a generator object for lazy queries.
`python >> domains = ['twitter.com','facebook.com', 'adobe.com'] >> breaches = [HIBP.get_domain_breaches(x) for x in domains] >> async_reqs = AsyncHIBP().imap(breaches) >> next(async_reqs) `
Release files for hibp 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hibp-0.0.5.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hibp-0.0.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / hibp-0.0.5.tar.gz
| Download URL | hibp-0.0.5.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f139a9c40ac8b4681e5250d88f74e200f3d1f0fdcf4c702f00a9303551882b7
|
|
BLAKE2b-256 checksum How to use checksums |
300916c2b4fd511e25ec747bfe5227f42e91ca2dcb698c1892634dda53f9f147
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / hibp-0.0.5-py2.py3-none-any.whl
| Download URL | hibp-0.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d31f25b8b4034fb561aebec91e81eadae92d40afb59b4f562e9aed2318b71f23
|
|
BLAKE2b-256 checksum How to use checksums |
fd167d990a23b19325ad13945fed40d8a2453c0d2d923f4869793a62ab052485
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |