#!/usr/bin/env python3 # https://prometheus.io/docs/guides/basic-auth/ # maya need to `apt install python3-bcrypt` import getpass import bcrypt password = getpass.getpass("password: ") hashed_password = bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt()) print(hashed_password.decode())