pyaadhaar


Namepyaadhaar JSON
Version 2.0.2 PyPI version JSON
download
home_pagehttps://github.com/Tanmoy741127/pyaadhaar
SummaryThis 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 Opncv. This library bundled with all the features to verify user's Email Id and Mobile Number & also to extract the photo of user.
upload_time2023-07-26 06:03:31
maintainer
docs_urlNone
authorTanmoy Sarkar
requires_python>=3.6
licenseMIT
keywords software development aadhaar e-kyc verification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## PyAadhaar Library

---

#### Designed to decode Aadhaar Old QR Code , Secure QR Code and also Offline XML

---

### **`|| Decode New Adhaar Secure QR Code ||`**

---

#### **`=> Initialize Object & Print Decoded Data`**

```
from pyaadhaar.decode import AadhaarSecureQr

obj  = AadhaarSecureQr(<:Data got from QR:>)
print(obj.decodeddata())
```

**Output :**

```
{'email_mobile_status': '2',
'referenceid': '345642020107890441252',
'name': 'X Das',
'dob': '01-01-2000',
'gender': 'F',
'careof': 'C/O: Y Das',
'district': 'Nadia',
'landmark': 'Primary School',
'house': 'N0456',
'location': 'Taherpur',
'pincode': '741159',
'postoffice': 'Taherpur',
'state': 'West Bengal',
'street': 'Taherpur Road',
'subdistrict': 'Ranaghat - I',
'vtc': 'Taherpur ',
'adhaar_last_4_digit': '3456',
'adhaar_last_digit': '6',
'email': 'no',
'mobile': 'yes'}
```

#### **`=> Verify Email Id Or Mobile`**

```
print(obj.verifyEmail("example@gmail.com"))
print(obj.verifyMobileNumber(9999999999))
```

**Output :**

```
True  # True if Email Verified
False # True if Mobile Number Verified
```

#### **`=> Check for Email Id Or Mobile Registration`**

```
print(obj.isEmailRegistered("example@gmail.com"))
print(obj.isMobileNoRegistered(9999999999))
```

**Output :**

```
True  # True if Email Registered
False # True if Mobile Number Registered
```

#### **`=> Get if there exists any image in the QR CODE`**

```
image = obj.isImage()
```
**Output :**

```
True  # True if Image is there
False # False if Image is not there
```

#### **`=> Get The Image Of User`**

```
image = obj.image()
```

#### **`=> Save The Image Of User`**

```
obj.saveimage("filename.jpg")
```

#### **`=> Get SHA256 Hash of Email`**

```
print(obj.sha256hashOfEMail())
```

**Output :**

```
d5598a28a82666c7ed9978h8936851189c494c84e62ab9782492fd038d9cb328
```

#### **`=> Get SHA256 Hash of Mobile Number`**

```
print(obj.sha256hashOfMobileNumber())
```

**Output :**

```
15a79565f9f1880e94dc62de51o9j7bd08542e7a6df82081ce1e72f0fb199e69
```

---

---

### **`|| Decode Old Adhaar QR Code ||`**

---

#### **`=> Initialize Object & Print Decoded Data`**

```
from pyaadhaar.decode import AadhaarOldQr

obj  = AadhaarOldQr(<:Data got from QR:>)
print(obj.decodeddata())
```

**Output :**

```
{'uid': '6XXXXXXXX789',
 'name': 'X Sarkar',
 'gender': 'M',
 'yob': '2001',
 'gname': 'Y Sarkar',
 'street': 'TAHERPUR ROAD',
 'lm': 'TAHERPUR',
 'loc': '-',
 'vtc': 'Taherpur (P)',
 'po': 'Taherpur',
 'dist': 'Nadia',
 'subdist': 'Ranaghat - I',
 'state': 'West Bengal',
 'pc': '741159',
 'dob': '01/01/2001'}
```

---

---

### **`|| Decode Adhaar Offline e-KYC XML ||`**

---

#### **`=> Initialize Object & Print Decoded Data`**

```
from pyaadhaar.decode import AadhaarOfflineXML

obj  = AadhaarOfflineXML(<:Offline e-KYC XML ZIP:>,<Passcode>)
print(obj.decodeddata())
```

**Output :**

```
{'email_mobile_status': '2',
'referenceid': '345642020107890441252',
'name': 'X Das',
'dob': '01-01-2000',
'gender': 'F',
'careof': 'C/O: Y Das',
'district': 'Nadia',
'landmark': 'Primary School',
'house': 'N0456',
'location': 'Taherpur',
'pincode': '741159',
'postoffice': 'Taherpur',
'state': 'West Bengal',
'street': 'Taherpur Road',
'subdistrict': 'Ranaghat - I',
'vtc': 'Taherpur ',
'adhaar_last_4_digit': '3456',
'adhaar_last_digit': '6',
'email': 'no',
'mobile': 'yes'}
```

#### **`=> Verify Email Id Or Mobile`**

```
print(obj.verifyEmail("example@gmail.com"))
print(obj.verifyMobileNumber(9999999999))
```

**Output :**

```
True  # True if Email Verified
False # True if Mobile Number Verified
```

#### **`=> Check for Email Id Or Mobile Registration`**

```
print(obj.isEmailRegistered("example@gmail.com"))
print(obj.isMobileNoRegistered(9999999999))
```

**Output :**

```
True  # True if Email Registered
False # True if Mobile Number Registered
```

#### **`=> Get The Image Of User`**

```
image = obj.image()
```

#### **`=> Save The Image Of User`**

```
obj.saveimage("filename.jpg")
```

#### **`=> Get SHA256 Hash of Email`**

```
print(obj.sha256hashOfEMail())
```

**Output :**

```
d5598a28a82666c7ed9978h8936851189c494c84e62ab9782492fd038d9cb328
```

#### **`=> Get SHA256 Hash of Mobile Number`**

```
print(obj.sha256hashOfMobileNumber())
```

**Output :**

```
15a79565f9f1880e94dc62de51o9j7bd08542e7a6df82081ce1e72f0fb199e69
```

---

---

### **`|| Decode Image Of QR Code ||`**

---

```
from pyaadhaar.utils import Qr_img_to_text

print(Qr_img_to_text(<Image File Location or Image file stream>))
```

**Output :**

```
["google.com","amazon.in"] # Will return a list of data
```

---

---

### **`|| Aadhaar Auto Initialize Class On QR code Type ||`**

---

#### **`=> Initialize`**

```

from pyaadhaar.utils import AadhaarQrAuto

obj = AadhaarQrAuto(<Aadhaar QR code Data >)
```

- Then all the methods are same corresponding to
  - AadhaarOldQr
  - AadhaarSecureQr

---

---

### **`|| Aadhaar Check Old or Secure QR Code||`**

---

#### **`=> Initialize`**

```
from pyaadhaar.utils import isSecureQr

print(isSecureQr(<Aadhaar QR code Data >))
```

**Output :**

```
True # If it is a new secure QR code, else False
```

---

---

# Contributors

#### Thanks to the developer of these libraries

- [Opencv](https://pypi.org/project/opencv-python/)
- [Pillow](https://pypi.org/project/Pillow/)
- [Libjpeg](https://pypi.org/project/pylibjpeg-libjpeg/)
- [Numpy](https://pypi.org/project/numpy/)

---

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Tanmoy741127/pyaadhaar",
    "name": "pyaadhaar",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "software development aadhaar e-kyc verification",
    "author": "Tanmoy Sarkar",
    "author_email": "ts741127@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "## 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#### **`=> Initialize Object & Print Decoded Data`**\n\n```\nfrom pyaadhaar.decode import AadhaarSecureQr\n\nobj  = AadhaarSecureQr(<:Data got from QR:>)\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#### **`=> 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#### **`=> 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#### **`=> 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#### **`=> Get The Image Of User`**\n\n```\nimage = obj.image()\n```\n\n#### **`=> Save The Image Of User`**\n\n```\nobj.saveimage(\"filename.jpg\")\n```\n\n#### **`=> Get SHA256 Hash of Email`**\n\n```\nprint(obj.sha256hashOfEMail())\n```\n\n**Output :**\n\n```\nd5598a28a82666c7ed9978h8936851189c494c84e62ab9782492fd038d9cb328\n```\n\n#### **`=> 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#### **`=> Initialize Object & Print Decoded Data`**\n\n```\nfrom pyaadhaar.decode import AadhaarOldQr\n\nobj  = AadhaarOldQr(<:Data got from QR:>)\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#### **`=> Initialize Object & Print Decoded Data`**\n\n```\nfrom pyaadhaar.decode import AadhaarOfflineXML\n\nobj  = AadhaarOfflineXML(<:Offline e-KYC XML ZIP:>,<Passcode>)\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#### **`=> 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#### **`=> 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#### **`=> Get The Image Of User`**\n\n```\nimage = obj.image()\n```\n\n#### **`=> Save The Image Of User`**\n\n```\nobj.saveimage(\"filename.jpg\")\n```\n\n#### **`=> Get SHA256 Hash of Email`**\n\n```\nprint(obj.sha256hashOfEMail())\n```\n\n**Output :**\n\n```\nd5598a28a82666c7ed9978h8936851189c494c84e62ab9782492fd038d9cb328\n```\n\n#### **`=> 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(<Image File Location or Image file stream>))\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#### **`=> Initialize`**\n\n```\n\nfrom pyaadhaar.utils import AadhaarQrAuto\n\nobj = AadhaarQrAuto(<Aadhaar QR code Data >)\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#### **`=> Initialize`**\n\n```\nfrom pyaadhaar.utils import isSecureQr\n\nprint(isSecureQr(<Aadhaar QR code Data >))\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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "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 Opncv. This library bundled with all the features to verify user's Email Id and Mobile Number & also to extract the photo of user.",
    "version": "2.0.2",
    "project_urls": {
        "Homepage": "https://github.com/Tanmoy741127/pyaadhaar"
    },
    "split_keywords": [
        "software",
        "development",
        "aadhaar",
        "e-kyc",
        "verification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27bcb78350beac6667a75b87e73cff72cdf3d6da57a8269642a750e1a94e4372",
                "md5": "967940e99161dc860a5683db7cbc6458",
                "sha256": "945f6c68933b0770260c4b48e83e32aa29f54856fa07abe4ace27e06435dbeba"
            },
            "downloads": -1,
            "filename": "pyaadhaar-2.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "967940e99161dc860a5683db7cbc6458",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7749,
            "upload_time": "2023-07-26T06:03:31",
            "upload_time_iso_8601": "2023-07-26T06:03:31.776751Z",
            "url": "https://files.pythonhosted.org/packages/27/bc/b78350beac6667a75b87e73cff72cdf3d6da57a8269642a750e1a94e4372/pyaadhaar-2.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-26 06:03:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Tanmoy741127",
    "github_project": "pyaadhaar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyaadhaar"
}
        
Elapsed time: 0.32989s