Unofficial package for fetching users information based on National ID Number (Tanzania)

Overview

Nida

Unofficial package for fetching users information based on National ID Number made by kalebu

Releases Downloads Downloads Downloads License: MIT

Installation

You can install it directly or using pip

Here how to install directly

git clone https://github.com/Kalebu/Nida
cd Nida
Nida -> python setup.y install

Here how to install from pip

pip install nida

Usage

To fetch user information based on ID number do this;

>>> from nida import load_user
>>> user_detail = load_user(national_id='XXXXXXXXX')
>>> print(user_datail)
user
{'Nin': 'XXXXXX', 'Firstname': 'XXXXXX', 'Middlename': 'XXXXXX', 'Surname': 'XXXXXX', 'Othernames': 'XXXXXX', 'Sex': 'XXXXXX', 'Dateofbirth': 'XXXXXX', 'Residentregion': 'XXXXXX', 'Residentdistrict': 'XXXXXX', 'Residentward': 'XXXXXX', 'Residentvillage': 'XXXXXX', 'Residentstreet': 'XXXXXX', 'Residentpostcode': 'XXXXXX', 'Permanentregion': 'XXXXXX', 'Permanentdistrict': 'XXXXXX', 'Permanentward': 'XXXXXX', 'Permanentvillage': 'XXXXXX', 'Permanentstreet': 'XXXXXX', 'Birthcountry': 'XXXXXX', 'Birthregion': 'XXXXXX', 'Birthdistrict': 'XXXXXX', 'Birthward': 'XXXXXX', 'Nationality': 'XXXXXX', 'Phonenumber': 'XXXXXX', 'Maritalstatus': 'XXXXXX', 'Occupation': 'XXXXXX', 'Primaryschooleducation': 'XXXXXX', 'Primaryschooldistrict': 'XXXXXX', 'Primaryschoolyear': 'XXXXXX', 'Photo': 'XXXXXX', 'Signature': 'XXXXXX', 'Nationalidnumber': 'XXXXXX', 'Lastname': 'XXXXXX'}

You can access user infromation by using keys and attributes just as shown below;

>>> user_detetail['Firstname']
'XXXXXX'
>>> user_detail.get('Middlename')
'XXXXXX'
>>> user_detail.Lastname
'XXXXXX'

National ID Photo and Signature are auto converted into PIL Images and you can easily save save just as shown below;

>>> user_detail.Photo.save('National_ID.png')
>>> user_detail.Signature.save('Signature.png')

If you want the data to be in the same from an API without any side effect preprocessing do this instead while loading user;

>>> user_detail = load_user('xxxxxxxxxx', json = True)
>>> print(user_detail)
{
    ....
}

Give it star

Did you find this repository useful to you ? Well then give it a star so as more people can get to know about it;

Issues

Are you facing any issue with usage of the package, just raise an issue and I looking to fixing it as soon as I can.

Contributions

If there is anything yould would like to add warmly welcome, Jus fork it

Disclaimers

This is not an official package, therefore I'm not responsible for any misinformation or misuse of the package of any kind !!!

Credits

All the credits to Kalebu and StackOverflow comment from dbrax

You might also like...
Simple calculator with random number button and dark gray theme created with PyQt6
Simple calculator with random number button and dark gray theme created with PyQt6

Calculator Application Simple calculator with random number button and dark gray theme created with : PyQt6 Python 3.9.7 you can download the dark gra

This Python library searches through a static directory and appends artist, title, track number, album title, duration, and genre to a .json object

This Python library searches through a static directory (needs to match your environment) and appends artist, title, track number, album title, duration, and genre to a .json object. This .json object is then used to post data to a specified table in a local MySQL database, credentials of which the user must set.

A password genarator/manager for passwords uesing a pseudorandom number genarator

pseudorandom-password-genarator a password genarator/manager for passwords uesing a pseudorandom number genarator when you give the program a word eg

Tools for teachers and students using nng (Natural Number Game)

nngtools Usage Place your nngsave.json to the directory in which you want to extract the level files. Place nngmap.json on the same directory. Run nng

Islam - This is a simple python script.In this script I have written all the suras of Al Quran. As a result, by using this script, you can know the number of any sura at the moment.
Islam - This is a simple python script.In this script I have written all the suras of Al Quran. As a result, by using this script, you can know the number of any sura at the moment.

Introduction: If you want to know sura number of al quran by just typing the name of sura than you can use this script. Usage in termux: $ pkg install

A small Python library which gives you the IEEE-754 representation of a floating point number.

ieee754 ieee754 is small Python library which gives you the IEEE-754 representation of a floating point number. You can specify a precision given in t

Xoroshiro-cairo - A xoroshiro128** pseudorandom number generator implementation in Cairo

xoroshiro-cairo A xoroshiro128** pseudorandom number generator implementation in

A test repository to build a python package and publish the package to Artifact Registry using GCB

A test repository to build a python package and publish the package to Artifact Registry using GCB. Then have the package be a dependency in a GCF function.

Python based scripts for obtaining system information from Linux.

sysinfo Python based scripts for obtaining system information from Linux. Python2 and Python3 compatible Output in JSON format Simple scripts and exte

Comments
  • Not able to get user details response

    Not able to get user details response

    Response shows this:

    urllib3.connectionpool DEBUG    Starting new HTTPS connection (1): ors.brela.go.tz:443
    urllib3.connectionpool DEBUG    https://ors.brela.go.tz:443 "POST /um/load/load_nida/XXXXXXXXXXXXX HTTP/1.1" 200 308
    'PHOTO'
    

    There is NIDA ID number where i put XXXXXXXXXXXX

    opened by ShedrackGodson 1
  • What about introducing guidelines, generic type hints, unit tests & TDD maybe?

    What about introducing guidelines, generic type hints, unit tests & TDD maybe?

    Hello @Kalebu , such a great work you have accomplished here mate, well done! The questions is, can generic type hints and tests, maybe TDD even, be introduced innit?

    If yes, so i guess we can proceed with the pull requests creations right,? cool!

    Also, one last humble suggestion from yours truly, i believe it might be of helpfully to have some guidelines for some of us beginners, juniors and other Intermediates maybe, don't you think? also some other suggestion that deserve separate issues maybe?

    However, i wouldn't even dare make fake promises like starting to work on that asap too, since I'm too lazy at doing multi commits if I'm being honest, but at least i would be happy to follow on whoever takes charge, if the suggestion is something doable. Thanks again for the great work you have done so far man, yours truly SW.

    opened by SentinelWarren 1
Releases(0.2)
Owner
Jordan Kalebu
Python Developer | Rust | Javascript | C/C++ | MachineLearning | OpenSource
Jordan Kalebu
A passive recon suite designed for fetching the information about web application

FREAK Suite designed for passive recon Usage: python3 setup.py python3 freak.py warning This tool will throw error if you doesn't provide valid api ke

toxic v3nom 7 Feb 17, 2022
Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.

Documentation OWPHydroTools GitHub pages documentation Motivation We developed OWPHydroTools with data scientists in mind. We attempted to ensure the

null 36 Dec 11, 2022
PyLaboratory 0 Feb 7, 2022
Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file. VISD can also perform vehicle speed detection on a video. All these features of VSID are provided to the user using a Web Application which is created using Flask

null 6 Feb 22, 2022
Eatlocal - This package helps users solve PyBites code challenges on their local machine

eatlocal This package helps the user solve Pybites code challenges locally. Inst

Russell 0 Jul 25, 2022
A web-based chat application that enables multiple users to interact with one another

A web-based chat application that enables multiple users to interact with one another, in the same chat room or different ones according to their choosing.

null 3 Apr 22, 2022
A Python application that helps users determine their calorie intake, and automatically generates customized weekly meal and workout plans based on metrics computed using their physical parameters

A Python application that helps users determine their calorie intake, and automatically generates customized weekly meal and workout plans based on metrics computed using their physical parameters

Anam Iqbal 1 Jan 13, 2022
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Amir Hussein Sharifnezhad 5 Oct 9, 2021
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

Amir Hussein Sharifnezhad 3 Oct 9, 2021
Number calculator application.

Number calculator application.

Michael J Bailey 3 Oct 8, 2021