{"id":21368685,"url":"https://github.com/tanmoysrt/pyaadhaar","last_synced_at":"2025-10-27T20:32:28.943Z","repository":{"id":53000150,"uuid":"325096433","full_name":"tanmoysrt/pyaadhaar","owner":"tanmoysrt","description":"This library is built to ease the process of decoding aadhaar QR codes and XML. It supprts old aadhaar QR codes , newly released Secure aadhaar QR codes and also Offline e-KYC XML. This library also can decode QR codes with Opencv. This library bundled with all the features to verify user\\'s Email Id and Mobile Number \u0026 also to extract the photo of user.","archived":false,"fork":false,"pushed_at":"2024-08-02T07:37:29.000Z","size":20803,"stargazers_count":40,"open_issues_count":5,"forks_count":15,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T13:43:59.779Z","etag":null,"topics":["aadhaar","decode","e-kyc","ekyc","kyc","offline","offlinexml","qrcode","verification"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyaadhaar/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanmoysrt.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-28T19:15:51.000Z","updated_at":"2024-11-01T14:58:14.000Z","dependencies_parsed_at":"2024-06-21T17:39:29.137Z","dependency_job_id":"bb5a2dbe-5cac-4299-8d2d-c04988dd9a1b","html_url":"https://github.com/tanmoysrt/pyaadhaar","commit_stats":null,"previous_names":["tanmoy741127/pyaadhaar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmoysrt%2Fpyaadhaar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmoysrt%2Fpyaadhaar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmoysrt%2Fpyaadhaar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmoysrt%2Fpyaadhaar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanmoysrt","download_url":"https://codeload.github.com/tanmoysrt/pyaadhaar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225859123,"owners_count":17535534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aadhaar","decode","e-kyc","ekyc","kyc","offline","offlinexml","qrcode","verification"],"created_at":"2024-11-22T07:25:56.332Z","updated_at":"2025-10-27T20:32:23.898Z","avatar_url":"https://github.com/tanmoysrt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PyAadhaar Library\n\n---\n\n#### Designed to decode Aadhaar Old QR Code , Secure QR Code and also Offline XML\n\n---\n\n### **`|| Decode New Adhaar Secure QR Code ||`**\n\n---\n\n#### **`=\u003e Initialize Object \u0026 Print Decoded Data`**\n\n```\nfrom pyaadhaar.decode import AadhaarSecureQr\n\nobj  = AadhaarSecureQr(\u003c:Data got from QR:\u003e)\nprint(obj.decodeddata())\n```\n\n**Output :**\n\n```\n{'email_mobile_status': '2',\n'referenceid': '345642020107890441252',\n'name': 'X Das',\n'dob': '01-01-2000',\n'gender': 'F',\n'careof': 'C/O: Y Das',\n'district': 'Nadia',\n'landmark': 'Primary School',\n'house': 'N0456',\n'location': 'Taherpur',\n'pincode': '741159',\n'postoffice': 'Taherpur',\n'state': 'West Bengal',\n'street': 'Taherpur Road',\n'subdistrict': 'Ranaghat - I',\n'vtc': 'Taherpur ',\n'adhaar_last_4_digit': '3456',\n'adhaar_last_digit': '6',\n'email': 'no',\n'mobile': 'yes'}\n```\n\n#### **`=\u003e Verify Email Id Or Mobile`**\n\n```\nprint(obj.verifyEmail(\"example@gmail.com\"))\nprint(obj.verifyMobileNumber(9999999999))\n```\n\n**Output :**\n\n```\nTrue  # True if Email Verified\nFalse # True if Mobile Number Verified\n```\n\n#### **`=\u003e Check for Email Id Or Mobile Registration`**\n\n```\nprint(obj.isEmailRegistered(\"example@gmail.com\"))\nprint(obj.isMobileNoRegistered(9999999999))\n```\n\n**Output :**\n\n```\nTrue  # True if Email Registered\nFalse # True if Mobile Number Registered\n```\n\n#### **`=\u003e Get if there exists any image in the QR CODE`**\n\n```\nimage = obj.isImage()\n```\n**Output :**\n\n```\nTrue  # True if Image is there\nFalse # False if Image is not there\n```\n\n#### **`=\u003e Get The Image Of User`**\n\n```\nimage = obj.image()\n```\n\n#### **`=\u003e Save The Image Of User`**\n\n```\nobj.saveimage(\"filename.jpg\")\n```\n\n#### **`=\u003e Get SHA256 Hash of Email`**\n\n```\nprint(obj.sha256hashOfEMail())\n```\n\n**Output :**\n\n```\nd5598a28a82666c7ed9978h8936851189c494c84e62ab9782492fd038d9cb328\n```\n\n#### **`=\u003e Get SHA256 Hash of Mobile Number`**\n\n```\nprint(obj.sha256hashOfMobileNumber())\n```\n\n**Output :**\n\n```\n15a79565f9f1880e94dc62de51o9j7bd08542e7a6df82081ce1e72f0fb199e69\n```\n\n---\n\n---\n\n### **`|| Decode Old Adhaar QR Code ||`**\n\n---\n\n#### **`=\u003e Initialize Object \u0026 Print Decoded Data`**\n\n```\nfrom pyaadhaar.decode import AadhaarOldQr\n\nobj  = AadhaarOldQr(\u003c:Data got from QR:\u003e)\nprint(obj.decodeddata())\n```\n\n**Output :**\n\n```\n{'uid': '6XXXXXXXX789',\n 'name': 'X Sarkar',\n 'gender': 'M',\n 'yob': '2001',\n 'gname': 'Y Sarkar',\n 'street': 'TAHERPUR ROAD',\n 'lm': 'TAHERPUR',\n 'loc': '-',\n 'vtc': 'Taherpur (P)',\n 'po': 'Taherpur',\n 'dist': 'Nadia',\n 'subdist': 'Ranaghat - I',\n 'state': 'West Bengal',\n 'pc': '741159',\n 'dob': '01/01/2001'}\n```\n\n---\n\n---\n\n### **`|| Decode Adhaar Offline e-KYC XML ||`**\n\n---\n\n#### **`=\u003e Initialize Object \u0026 Print Decoded Data`**\n\n```\nfrom pyaadhaar.decode import AadhaarOfflineXML\n\nobj  = AadhaarOfflineXML(\u003c:Offline e-KYC XML ZIP:\u003e,\u003cPasscode\u003e)\nprint(obj.decodeddata())\n```\n\n**Output :**\n\n```\n{'email_mobile_status': '2',\n'referenceid': '345642020107890441252',\n'name': 'X Das',\n'dob': '01-01-2000',\n'gender': 'F',\n'careof': 'C/O: Y Das',\n'district': 'Nadia',\n'landmark': 'Primary School',\n'house': 'N0456',\n'location': 'Taherpur',\n'pincode': '741159',\n'postoffice': 'Taherpur',\n'state': 'West Bengal',\n'street': 'Taherpur Road',\n'subdistrict': 'Ranaghat - I',\n'vtc': 'Taherpur ',\n'adhaar_last_4_digit': '3456',\n'adhaar_last_digit': '6',\n'email': 'no',\n'mobile': 'yes'}\n```\n\n#### **`=\u003e Verify Email Id Or Mobile`**\n\n```\nprint(obj.verifyEmail(\"example@gmail.com\"))\nprint(obj.verifyMobileNumber(9999999999))\n```\n\n**Output :**\n\n```\nTrue  # True if Email Verified\nFalse # True if Mobile Number Verified\n```\n\n#### **`=\u003e Check for Email Id Or Mobile Registration`**\n\n```\nprint(obj.isEmailRegistered(\"example@gmail.com\"))\nprint(obj.isMobileNoRegistered(9999999999))\n```\n\n**Output :**\n\n```\nTrue  # True if Email Registered\nFalse # True if Mobile Number Registered\n```\n\n#### **`=\u003e Get The Image Of User`**\n\n```\nimage = obj.image()\n```\n\n#### **`=\u003e Save The Image Of User`**\n\n```\nobj.saveimage(\"filename.jpg\")\n```\n\n#### **`=\u003e Get SHA256 Hash of Email`**\n\n```\nprint(obj.sha256hashOfEMail())\n```\n\n**Output :**\n\n```\nd5598a28a82666c7ed9978h8936851189c494c84e62ab9782492fd038d9cb328\n```\n\n#### **`=\u003e Get SHA256 Hash of Mobile Number`**\n\n```\nprint(obj.sha256hashOfMobileNumber())\n```\n\n**Output :**\n\n```\n15a79565f9f1880e94dc62de51o9j7bd08542e7a6df82081ce1e72f0fb199e69\n```\n\n---\n\n---\n\n### **`|| Decode Image Of QR Code ||`**\n\n---\n\n```\nfrom pyaadhaar.utils import Qr_img_to_text\n\nprint(Qr_img_to_text(\u003cImage File Location or Image file stream\u003e))\n```\n\n**Output :**\n\n```\n[\"google.com\",\"amazon.in\"] # Will return a list of data\n```\n\n---\n\n---\n\n### **`|| Aadhaar Auto Initialize Class On QR code Type ||`**\n\n---\n\n#### **`=\u003e Initialize`**\n\n```\n\nfrom pyaadhaar.utils import AadhaarQrAuto\n\nobj = AadhaarQrAuto(\u003cAadhaar QR code Data \u003e)\n```\n\n- Then all the methods are same corresponding to\n  - AadhaarOldQr\n  - AadhaarSecureQr\n\n---\n\n---\n\n### **`|| Aadhaar Check Old or Secure QR Code||`**\n\n---\n\n#### **`=\u003e Initialize`**\n\n```\nfrom pyaadhaar.utils import isSecureQr\n\nprint(isSecureQr(\u003cAadhaar QR code Data \u003e))\n```\n\n**Output :**\n\n```\nTrue # If it is a new secure QR code, else False\n```\n\n---\n\n---\n\n# Contributors\n\n#### Thanks to the developer of these libraries\n\n- [Opencv](https://pypi.org/project/opencv-python/)\n- [Pillow](https://pypi.org/project/Pillow/)\n- [Libjpeg](https://pypi.org/project/pylibjpeg-libjpeg/)\n- [Numpy](https://pypi.org/project/numpy/)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanmoysrt%2Fpyaadhaar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanmoysrt%2Fpyaadhaar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanmoysrt%2Fpyaadhaar/lists"}