Python library for ZhianTec fingerprint sensors (e.g. ZFM-20, ZFM-60)
Alternatives To Pyfingerprint
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Python Validity727
a month ago94mitPython
Validity fingerprint sensor prototype
Xamarin Fingerprint402178a year ago47May 04, 202246ms-plC#
Xamarin and MvvMCross plugin for authenticate a user via fingerprint sensor
4 years ago28apache-2.0Java
Android Fingerprint authentication and encryption with RxJava
Adafruit Fingerprint Sensor Library353
16 days ago17otherC++
Arduino library for interfacing to the fingerprint sensor in the Adafruit shop
a year ago31Kotlin
Perform quick actions via tap fingerprint sensor.
5 years ago6bsd-3-clausePython
Reverse engineering the Validity 138a:0091 fingerprint sensor (Dell XPS 15/13 2016-2017 9X50 and 9X60)
3 years ago2October 31, 201914otherPython
Python library for ZhianTec fingerprint sensors (e.g. ZFM-20, ZFM-60)
25 days ago14lgpl-2.1C
libfrpint driver for a family of Elantech fingerprint sensors
3 years ago
Project aiming to reverse engineer Dell XPS 9570 fingerprint sensor (27c6:5395)
6 years ago8gpl-3.0Objective-C
DroidID - Unlock your Mac using your Android phone's fingerprint sensor!
Alternatives To Pyfingerprint
Select To Compare

Alternative Project Comparisons

Python library for ZFM fingerprint sensors

Documentation Status

The PyFingerprint library allows to use ZhianTec ZFM-20, ZFM-60, ZFM-70 and ZFM-100 fingerprint sensors on the Raspberry Pi or other Linux machines. Some other models like R302, R303, R305, R306, R307, R551 and FPM10A also work.

Note: The library is inspired by the C++ library from Adafruit Industries: adafruit/Adafruit-Fingerprint-Sensor-Library


There are two ways of installing PyFingerprint: Installation of the stable or development version. The stable version is distributed through the PM Code Works APT repository and is fully tested but does not contain the latest changes.

Installation of the stable version

Add PM Code Works repository:

  • Debian 9/Ubuntu 16 & 17:

    echo "deb stretch main" | sudo tee /etc/apt/sources.list.d/pm-codeworks.list

  • Debian 10/Ubuntu 18 & 19:

    echo "deb buster main" | sudo tee /etc/apt/sources.list.d/pm-codeworks.list

Add PM Code Works signing key:

wget -qO - | sudo apt-key add -
sudo apt update

Install the package:

sudo apt install python3-fingerprint

Installation of the development version

The development version contains the latest changes that may not have been fully tested and should therefore not be used in production. It is recommended to install the stable version.

Install required packages for building:

sudo apt install git devscripts equivs

Clone this repository:

git clone

Build the package:

cd ./pyfingerprint/src/
sudo mk-build-deps -i debian/control
dpkg-buildpackage -uc -us

The library supports Python 2 and Python 3. There are one Debian package for each. It's up to you which version you install.

For Python 3 use:

sudo dpkg -i ../python3-fingerprint*.deb

For Python 2 use:

sudo dpkg -i ../python-fingerprint*.deb

Install missing dependencies:

sudo apt -f install

Alternative installation using PIP

If you do not have a Debian based OS or something does not work you can also install the Python package via PIP:

pip install pyfingerprint

NOTE: It is important to not use the Debian package and PIP package at the same time!


Allow non-root user "pi" (replace it correctly) to use the serial port devices:

sudo usermod -a -G dialout pi
sudo reboot

How to use the library

Enroll a new finger

python /usr/share/doc/python-fingerprint/examples/

Search an enrolled finger

python /usr/share/doc/python-fingerprint/examples/

Delete an enrolled finger

python /usr/share/doc/python-fingerprint/examples/

Download image of a scanned finger

python /usr/share/doc/python-fingerprint/examples/

Generate a 32-bit random number on the ZFM hardware PRNG

python /usr/share/doc/python-fingerprint/examples/

Further information

See my blog post for more information:

Popular Sensor Projects
Popular Fingerprint Projects
Popular Hardware Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python Library