This is the driver (or interface) for the fingerprint sensor on my laptop (LG Gram 2018). This script should work on other laptops and even desktops with fingerprint sensors as well.
Call Windows Biometric Framework API to interact with the sensor. Technically, you can use the API to access any WBF devices, including facial recognition and iris recognition.
You can integrate this interface with other command line and GUI programs to serve as an authentication.
myFP = FingerPrint()
try:
myFP.open()
print("Please touch the fingerprint sensor")
if myFP.verify():
print("Hello! Master")
else:
print("Sorry! Man")
finally:
myFP.close()
fix the focus issue
organize Constants
Currently the program needs to be called in the top-level window. So use the command line instead of IDEs to call the program, otherwise the sensor will ignore your touch.
python fingerprint.py