Skip to main content

A Python client for the HaveIBeenPwned REST API

Project description

Copyright (c) 2015 Eric Fay @icanhasfay

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Description: PyPwned
======
[![Build Status](https://travis-ci.org/icanhasfay/PyPwned.svg)](https://travis-ci.org/icanhasfay/PyPwned)

A Python client for the HaveIBeenPwned REST API. https://haveibeenpwned.com/

Installation
-----
```pip install pypwned```

Requires
-----
* requests
* pyOpenSSL
* ndg-httpsclient
* pyasn1

Usage
-----

### Breaches


#### Getting all breaches for an account

##### Get all breaches for an account across all domains.

```
import pypwned
print pypwned.getAllBreachesForAccount(email="foo@bar.com")
```

##### Get all breaches for an account across a specific domain.

```
import pypwned
print pypwned.getAllBreachesForAccount(email="foo@bar.com",domain="adobe.com")
```


#### Getting all breached sites in the system

##### Return the details of each breach in the system.

```
import pypwned
print pypwned.getAllBreaches()
```

##### Return the details of each breach associated with a specific domain.

```
import pypwned
print pypwned.getAllBreaches(domain="adobe.com")
```

#### Getting a single breached site

Return the details of a single breach, by breach name.

```
import pypwned
print pypwned.getSingleBreachedSite(name="adobe")
```

#### Getting all data classes in the system

Return the different types of data classes that are associated with a record in a breach. E.G, Email addresses and passwords

```
import pypwned
print pypwned.getAllDataClasses()
```

### Pastes


#### Getting all pastes for an account

Return any pastes that contain the given email address

```
import pypwned
print pypwned.getAllPastesForAccount(account="foo@bar.com")
```




Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Topic :: Security

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

pypwned-0.1.6.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

pypwned-0.1.6-py2-none-any.whl (5.6 kB view details)

Uploaded Python 2

File details

Details for the file pypwned-0.1.6.tar.gz.

File metadata

  • Download URL: pypwned-0.1.6.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pypwned-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c861a7bab400652f7dcf89646efffde7e9f4ebf79ebb90b03847d9a9a01a44e0
MD5 c0c6d1075d3003408c7357e0589daa12
BLAKE2b-256 29166d168d1ed815a6f1e7ce1870da5f8223c9fd6cc506cfa404b0b69236ff58

See more details on using hashes here.

File details

Details for the file pypwned-0.1.6-py2-none-any.whl.

File metadata

File hashes

Hashes for pypwned-0.1.6-py2-none-any.whl
Algorithm Hash digest
SHA256 424dce56bb4f98f67fe6f8a909afa995d2071e920199497eeeed788ca7cf20df
MD5 c7ae21d4324e40747775db314614d7fe
BLAKE2b-256 edfcf88b49b70545fcf399457838e98e4d0094c0a5987acde24d979e47310228

See more details on using hashes here.

Supported by

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