Python Django Biometric Authentication

This is a Python Django Web Biometric Authentication that demonstrates how Software Engineers and Software Developers can add Biometric Fingerprint Authentication to their Python Web Applications developed using the Python Django Web Framework with DigitalPersona series of Fingerprint Scanners.

I Honestly did NOT plan to Develop a Python Django Biometric Authentication PACK for Web Applications developed on the Python Django Web Framework. I all along assumed that the Python Flask Web Biometric Authentication PACK sufficed for Python Django Web Applications since the backbone is still Python.

But was I so wrong?

People have never stopped pulling these surprises on me.

I could call them out but …!

Python Django Biometric Authentication
Python Django Biometric Authentication

By the way, on a similar front, though on PHP, I am also developing a PHP Web Biometric Authentication Gold PACK tailored for PHP Laravel Web Framework because the same People’s Cousins on the PHP side of things still find self-justifiable reasons as to why a PHP Web Application functionality will not work on their PHP Web Application developed on the Laravel Web Framework.

I have also developed and implemented a Raspberry Pi Biometric integration in Python too.

Whatever Python Web Framework you choose to implement your Python Web Application, rest easy, your friend Joseph here is always available and at your Beck and Call to Help you integrate Biometric Authentication in your Python Web Application.

Joseph Mwema's Email Address and YouTube Channel's QR Code
Joseph Mwema’s Email Address and YouTube Channel’s QR Code

Let’s continue.

Unlike what I previously believed in the past, it may NOT always be comfortable and easy on some quotas to tweak a Python Flask Web Application to work as a Python Django Web Application hence the reason why I Developed Python Django Biometric Authentication PACK for those who want to implement Biometric Access Control in their Python Django Web Applications.

My Objective has always been to Help People, Companies and SMEs to integrate Biometrics Authentication in their Python Web Application Projects whether on Django or Flask but usually, People will first want to See a Django Python Biometric Authentication prototype that Works before they unanimously decide, “OK! Joseph can Help us with this. Let’s get this guy to handle Python Django Biometric Authentication for us”.

To those Folks, watch this Youtube clip below of how the Django Python Biometric Web Application I developed works.

Python Django Biometric Fingerprint Enrollment Process Youtube Video Clip
Python Django Biometric Fingerprint Enrollment Process Youtube Video Clip

Now! As I have since established over time, People will always want to stick to their favorite Web Frameworks and not steer away to closely related Frameworks even for functionalities that would seamlessly work on both Web Frameworks and hence the reason why I developed this tailored solution to answer the request of Python Django Web Framework Developers.

To the Python Django Web Framework funs, I heard you loud and clear. This is for you.

Python Django Biometric Authentication PACK is purposely Designed and Developed for those who categorically want to integrate Biometric Authentication in Python Django Web Browser based Applications that are developed to run on Windows back-end Servers.

Python Django Biometric Authentication PACK works for Windows based Client Computers and runs on a Windows based PHP Web Server.

The functionality of adding Biometric Authentication in Python Web Browser based Applications on Windows has previously been addressed by the following Web Biometric Solutions;

Users Data enrolled by Django Biomeric Jomutech App and Archived in SQL Table in MySQL Database
Users Data enrolled by Django Biomeric Jomutech App and Archived in SQL Table in MySQL Database

The Key Features of Python Django Biometric Authentication PACK

  • Python Django Web Biometric Fingerprint Registration Panel (for integrating Fingerprint Enrolment)
  • Python Django Web Biometric Fingerprint Verification Panel (for integrating Fingerprint Authentication)
  • Easy and Simple to integrate with your Python Django Web Applications on Server Side
  • It runs on Windows on Server Side hence no need to buy and setup Linux Server or hire Linux Systems Engineers to support it
  • Perform Biometric Fingerprints Authentication in Python Code Back-end.
  • Blitz speeds for Biometric Fingerprint Authentication in Python Server Side
  • Very Smooth, Light weight and Fast on Client Computer Web Browsers
  • Smooth and Fluid Web Graphical User Interface for your Django Client Side Computers
  • Simple and Easy to Integrate with your Django and Python Web Applications
  • Simple and Easy to Setup on a Apache or Nginx web servers
  • Now supports the latest Python 3.7.3
  • Now supports the latest MySQL 8.x Database and above
  • Supports the latest Maria DB 10 Database and above
  • It works on Modern Web Servers like Apache 2, Nginx
  • Simple and Well Documented Python and Django Code for ease of Python Django Integration with your Python Django Web Application
  • Shortest turnaround time of 15-30 minutes to integrate it with your Python Django Web Application
  • No need to install Python and Django on Client Computers. Install Python and Django only on Server Side
  • FREE 1 Month(s) of Biometrics Software Integration and Developer Support after you Purchase it

Python Django Biometric Authentication is best suited for adding Biometric Authentication to New and Existing Django Python Web Applications for use by People, Schools, Organizations, Companies and SMEs implementing Information Management Systems developed on the Python Django Web Framework.

By Integrating Biometric Authentication in your Python Django Web Browser based Application with this Python Django Biometric Authentication PACK,  you add Biometric based Access Control features into your Web Application with Ease and Quickly.

It should NOT take you more than 30 minutes considering that I have done almost everything for you and all you have to do is to integrate the app, Python Django Biometric Authentication PACK into your Python Django Site.

If you simply want to add Biometric Enrollment and Biometric Authentication in your Django Web Application project, order this solution right now and get over that hurdle. Python Django Biometric Authentication PACK helps you accomplish that feat in a less than 30 minutes activity.

I will also work online together with you, hand in hand for 1 Month to make sure your Python Django Biometric Authentication and Integration experience is smooth (…that is if you do not mind getting a helping hand with your Python code)

The Python Django Biometric site and Jomutech app setup Python Files

models . py file and users class model

The models . py file has the users class which is a model of the back-end SQL table where a User’s Particulars and Biometric Fingerprint Data is archived after it is enrolled by the Django Biometric Jomutech App.

Below is the Python code for the users class model.

from django.db import models

class users(models.Model):
	fname = models.CharField(max_length=50)
	sname = models.CharField(max_length=50)
	empno = models.CharField(max_length=50)
	fpbiotemplate1 = models.CharField(max_length=10000)
	fpbiotemplate2 = models.CharField(max_length=10000)
	fno1 = models.CharField(max_length=2)
	fno2 = models.CharField(max_length=2)
Python Django Biometric users class SQL Table model for jomutech app and its jomutech_users SQL table
Python Django Biometric users class SQL Table model for jomutech app and its jomutech_users SQL table

Here below is jomutech_users SQL Table created after the users class model above

The SQL table is named jomutech_users from the naming convention that follows having the app name + underscore + model class for table.

In this instance, the app name is jomutech, followed by underscore _ and finally the model class which is users hence the name jomutech_users for the backend table.

Python Django Biometric Authentication Database and jomutech_users SQL Table
Python Django Biometric Authentication Database and jomutech_users SQL Table

views . py file

Below is part of the code in the views . py file for user biometric authentication.

After a successful biometric authentication of a probe fingerprint of a subject, the person’s particulars are retrieved, encoded in a json object and returned to the webpage for display as a message and populating the fields first name, second name and employee number.

#If Fingerprint Authentication is Successful
	statusVal = 1
	personPart[0] = row.fname
	personPart[1] = row.sname
	personPart[2] = row.empno
	personPart[3] = row.id
	personPart[4] = statusVal
	print(row.fname, row.sname, row.empno, row.id, statusVal)
	print(personPart[4])
	
	if statusVal == 1:
		print("SUCCESS")
		print(personPart)
		return JsonResponse({'status':'OK', 'funame':personPart[0], 'suname':personPart[1], 'empno':personPart[2]})
	elif statusVal < 1:
		print("FAIL")
		print(personPart)
		return JsonResponse({'status':'OK', 'funame':personPart[0], 'suname':personPart[1], 'empno':personPart[2]})

def validateentry(request):
    pempno = request.GET.get('empno', None)
    data = {
        'empnoexists': users.objects.filter(empno__iexact=pempno).exists()
    }
    return JsonResponse(data)
Python Django Biometric app views file
Python Django Biometric app views file

urls . py file

In the urls . py file the url for starting the enrollment and authentication web pages of the Python Django Biometric Authentication app are defined.

enrollment launches the enrollment page when http://127.0.0.1:8000/jomutech/enrollment is run on the web browser

Similarly, authentication launches the enrollment page when http://127.0.0.1:8000/jomutech/authentication is run on the web browser

Below is the python code in the urls . py file

from django.urls import path
from . import views

urlpatterns = [
	path('', views.home, name="jomutech-home"),
	path('enrollment', views.enroll, name="jomutech-enrollment"),
	path('authentication', views.authenticate, name="jomutech-authentication"),
	path('enrolluser', views.registeruser, name="jomutech-register-user"),
	path('authenticateuser', views.authenticateuser, name="jomutech-authenticate-user"),
	path('validateentry', views.validateentry, name='jomutech-validate-user'),
]
Python Django Biometric urls for the launching the Jomutech App Web Pages for  Biometric Enrollment and Biometric Authentication
Python Django Biometric urls for the launching the Jomutech App Web Pages for Biometric Enrollment and Biometric Authentication

site settings . py file

settings . py file showing installed jomutech django biometric authentication app

site settings py file showing installed jomutech bometrics authentication app
site settings py file showing installed jomutech bometrics authentication app

site settings . py file showing django biometric configs for MySQL Database

site settings py file showing django biometric configs for MySQL database backend
site settings py file showing django biometric configs for MySQL database backend

apps . py file

apps. py file showing the name of the site’s app called jomutech

See below screenshot

apps py file for jomutech django biometric authentication app
apps py file for jomutech django biometric authentication app

How to Register and Enroll Biometric Fingerprints of a User in Python Django Biometric Enrollment PACK

  • Connect Biometric Fingerprint Scanner to your Python Development Computer
  • Open Command Prompt console by running CMD.exe in Windows
  • Change Directory (CD) to folder inside your Python Site where you have manage.py file
  • Run in Command Prompt console this command python manage.py runserver to crank up your Python Django Web Server
  • Wait for server to start and in the meantime open your Web Browser
  • On the Browser’s Web Address, type Biometric Enrollment path defined in your Django app’s urls.py file and press Enter to open it
  • With Python Django Biometric Enrollment Web Page now opened,  proceed to Register and Enroll Biometric Fingerprints of a User in your Python Django App

It is that simple!

Python Django Biometric Authentication Site and Jomutech App
Python Django Biometric Authentication Site and Jomutech App

See picture below for visual graphics of how your command prompt will look like.

In my case this is how I would go about Registering and Enrolling Biometric Fingerprints of a User on Python Django

First, I would make sure that I have a DigitalPersona Fingerprint Scanner connected to my Computer.

Thereafter, I would then open Command Prompt by running CMD.exe from the Search Programs and Files option after clicking on the start button of my windows.

With Command Prompt now open, I will change directory to F:\DJANGO_BIOMETRIC_AUTHENTICATION where I currently have my Django Python site with my Python Django Biometric App inside.

Inside the F:\DJANGO_BIOMETRIC_AUTHENTICATION directory is where my Django Python site’s manage.py file is located. I will need this file, manage.py to fire up my Python Django Server.

Once inside my site’s folder, I will then start the Django Python Server by running python manage.py runserver

With Server started, I would then open my web browser and at the web address type the URL for enrollment defined in the urs.py file of my Django Python App. My Django Python’s URL for enrollment is http://127.0.0.1:8000/jomutech/enrollment

With my Python Django Biometric app’s Enrollment page open, I will then proceed to Register and Enroll the Biometric Fingerprints of a User and finally click the Register button to save their Particulars and Biometric Data into the MySQL database back-end.

Starting Python Django Biometric Authentication Server
Starting Python Django Biometric Authentication Server

How to Authenticate a User using Biometric Fingerprints in Python Django Biometric Authentication PACK

  • Ensure your Biometric Fingerprint Scanner is connected to your Python Development Computer
  • Proceed to Open Command Prompt in your Windows Desktop
  • Change Directory to your Python Django’s site folder where your manage.py file is located
  • From your Command Prompt console, run this command python manage.py runserver to start your Python Django Web Server
  • As you wait for server to start, open your Web Browser
  • At the Browser’s Web Address, type Biometric Authentication path defined in your Django app’s urls.py file and run it to open it
  • With Python Django Biometric Authentication Web Page now opened,  proceed to Biometric Fingerprint Authenticate Users in your Python Django App

It is that easy!

Here is how I would go about Authenticating Users with Biometric Fingerprints in Python Django

To begin with, I would ascertain that I have already connected a DigitalPersona Fingerprint Scanner to my Computer.

I would then open Command Prompt in Windows

After Command Prompt is opened, I will then change directory to F:\DJANGO_BIOMETRIC_AUTHENTICATION where my Django Python site runs from

In the F:\DJANGO_BIOMETRIC_AUTHENTICATION directory is where manage.py used to run Python Django Server is situated.

Thereafter, I will then start the Django Python Server by running python manage.py runserver

Once the Python Django Server is started, I would then open my web browser and at the web address type the URL for Biometric Authentication defined in the urs.py file of my Django Python App. The Python Django’s URL for Authentication in my app is http://127.0.0.1:8000/jomutech/enrollment

With my Python Django Biometric app’s Authentication page open, I will then proceed to Authenticate Users Biometrically using their Fingerprints.

Here is a full Youtube video clip showing how to Register User particulars, Enroll their Biometric Fingerprints and Authenticate them with their Biometric Fingerprints in a Python Django Web Application using a DigitalPersona Fingerprint Scanner.

Python Biometric Enrollment and Authentication Youtube Video Clip
Python Biometric Enrollment and Authentication Youtube Video Clip

Requirements for Installing and Integrating with Python Django Biometric Authentication for Windows

Windows Computer Server Architecture Type

  • 64 bit

Windows Computer Server RAM

  • 16 Gb RAM and above

Windows Computer Server Processor Cores

  • More than 4 Cores to take advantage of multi-threading

Windows Server Operating System

  • Windows 7, Windows 8, Windows 10. Note:  (Windows Vista, Windows XP and below are not supported at all).

Client Computers Windows Operating System

  • Windows 7, Windows 8 or Window 10

Web Server Supported

  • Apache 2, Nginx, IIS

Scripting Language Supported

  • Python 3.7.3 and above most recommended

Windows Server Computer Database back-end

  • MySQL 5.7, MySQL 8.x, MariaDB 10. The Database should be 64 bit.

Fingerprint Scanners

  • DigitalPersona 4500
  • DigitalPersona 5100
  • DigitalPersona 5160
  • DigitalPersona 5200
  • DigitalPersona 5300
Digital Persona Fingerprint Scanner
Digital Persona Fingerprint Scanner

Important Factors to consider before Shopping for a Biometric Fingerprint Scanner for use in your Web Biometric Authentication

  • One important thing to consider, if you are planning to Develop and Implement a Web Browser based Biometric solution whether in PHP, ASPNET, JavaScript, Python, HTML5 or NodeJS go with DigitalPersona type of Fingerprint Scanners. Choose anything from DigitalPersona series of devices and you will have much success in your Web Biometric application.
  • Majority of equipment and machinery are designed for particular use cases but DigitalPersona series of Fingerprint Scanners are Excellent Workhorses whether for a Standalone application, Web application, Raspberry Pi application or Android Application. This is usually NOT the same case for many other Fingerprint Scanners largely available in the market
  • The DigitalPersona brand of Fingerprint Scanners have over time been tested and proven for successful implementation of digital identity management solutions in various diverse industry use cases and they are NOT more expensive than the other Fingerprint Scanners currently available in the market.
  • You can get a DigitalPersona series of Fingerprint Scanners paltry USD $ 80 – 99 just around the same price you would pay for other common brands of fingerprint scanners in the market.

Hey, that’s all! This is where the road ends.

Here are some screenshots of Python Django Biometric Authentication PACK I developed.

Photos and Screenshots of Python Django Biometric Fingerprint Enrollment

Python Django Biometric Fingerprint Enrollment
Python Django Biometric Fingerprint Enrollment
Python Django Biometric Fingerprint Enrollment Process
Python Django Biometric Fingerprint Enrollment Process
Python Django Biometric Fingerprint Enrollment Complete
Python Django Biometric Fingerprint Enrollment Complete

Photos and Screenshots of Python Django Biometric Fingerprint Authentication

Python Django Biometric Fingerprint Authentication
Python Django Biometric Fingerprint Authentication
Python Django Biometric Fingerprint Authentication showing Fingerprint Match NOT Found
Python Django Biometric Fingerprint Authentication showing Fingerprint Match NOT Found
Python Django Biometric Fingerprint Authentication Fingerprint Matched Successfully
Python Django Biometric Fingerprint Authentication Fingerprint Matched Successfully

Some of the Organizations that I have Helped integrate Biometrics in their Software Systems

Struggling with your Python Django Web Biometric Integration

Are you struggling to get your Python Django Web Biometric integration working?

How about I help you cut short the time wasted and get this headache out of your way?

Reach out to me now!

Joseph Mwema's Email Address and YouTube Channel's QR Code
Joseph Mwema’s Email Address and YouTube Channel’s QR Code
error: Content is protected !!