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.txtSet 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 \While the virtual environment is activated, you can run the Flask application with:
flask runApp runs at http://127.0.0.1:5000/ by default.
curl -s -X POST http://127.0.0.1:5000/hibp \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]"}' | jq