Skip to content

officialBeebe/hibp-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

Clone project and install dependencies

git clone https://github.com/officialBeebe/HIBP.git
cd HIBP

# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Set environment variables

Set the required variables in your shell or a .env file:

export HIBP_API_URL=https://haveibeenpwned.com/api/v3 \
       HIBP_API_KEY=123-your-api-key \

Run the server

While the virtual environment is activated, you can run the Flask application with:

flask run

App runs at http://127.0.0.1:5000/ by default.

Test endpoint

curl -s -X POST http://127.0.0.1:5000/hibp \
        -H "Content-Type: application/json" \
        -d '{"email": "[email protected]"}' | jq

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages