pwnedapi (Have I Been Pwned)
A Python library to leverage Troy Hunt's Have I Been Pwned API v2 and the k-Anonymity model. Inspired by Phil Nash's Ruby gem pwned.
Support
This library is supported on Python versions 3.5 and up. Some development packages require Python 3.6 or newer so issues regarding the development environment compatibility should not be reported without first attempting to install newer version of Python.
Installation
# Option 1: From the PyPI repository
pip install pwnedapi
# Option 2: For people of great taste
pipenv install pwnedapi
# Option 3: Locally
git clone https://github.com/nikoheikkila/pwnedapi
cd pwnedapi
python setup.py install
Usage
In its simplest form you'll only need to use two methods. Will probably add more if and when the API grows.
You can also scan a file of passwords, and export results in any format
supported by the tablib library.
CLI usage
The library also installs a command-line tool which you can use to check
your password from the comfort of your terminal. Run pwned to see all the possibilities.
Development
Clone the repository normally. Then run make to install the dependencies.
While developing it's useful to ensure an acceptable code quality where the
Pylama linter is helpful: run make lint to check your code. Once you have
written your tests run make test to invoke the PyTest suites.
To run tests and calculate the code coverage run make coverage. This command
will fail if you haven't set up a Codecov project with $CODECOV_TOKEN
variable.
Remember to document your features and see that the documentation compiles
successfully by running make docs.
Contributing
Check the source code and issues from this repository, and should anything interesting pop out feel free to open a pull request.
Before your changes will be merged make sure that Travis CI pipeline is green and code coverage is on acceptable level. GitHub takes care of these eventually but to save time always consider running the tests locally before pushing.
Metadata
Release files for pwnedapi 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pwnedapi-1.0.2.tar.gz | 6.6 kB | Without provenance | Details for pwnedapi-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pwnedapi-1.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pwnedapi-1.0.2-py2.py3-none-any.whl |
Total release size: 14.2 kB
Release files / pwnedapi-1.0.2.tar.gz
| Download URL | pwnedapi-1.0.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04bd60c9a0643c6b741775bdfe9c70b9433d44553cad623996569b1489e19537
|
|
BLAKE2b-256 checksum How to use checksums |
c8d4ad0929eee6e58a72c6353d9a599a4aa809b5e439dfcbe0602ebe8dd731b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / pwnedapi-1.0.2-py2.py3-none-any.whl
| Download URL | pwnedapi-1.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3663236ce0f15f796b966a988e9fa1dab20c7e81955a5f3b86bd73adef90da93
|
|
BLAKE2b-256 checksum How to use checksums |
2b3c59364e23fc52e99a0f871e1509823c44d1075d6379ad813fe87eb6ec1b55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for pwnedapi 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.