All Projects → Kalebu → Nida

Kalebu / Nida

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nida

pyswahili
A Swahili version of programming language to allow Swahili speakers get started with programming
Stars: ✭ 64 (+36.17%)
Mutual labels:  tanzania, python-tanzania
mtaa
A package consisting of all Tanzania locations from region to streets in an easily accessible way
Stars: ✭ 27 (-42.55%)
Mutual labels:  tanzania, python-tanzania
python-client
A Python library to ease the integration with the Beem Africa (SMS, AIRTIME, OTP, 2WAY-SMS, BPAY, USSD)
Stars: ✭ 24 (-48.94%)
Mutual labels:  tanzania, python-tanzania
tz-mpesa-ussd-push
Vodacom Tanzania USSD Push API Client
Stars: ✭ 18 (-61.7%)
Mutual labels:  tanzania
CodeForAfrica.org
The @CodeForAfrica landing page. Built with Jekyll and hosted on Github Pages. Accessible at https://codeforafrica.org/
Stars: ✭ 20 (-57.45%)
Mutual labels:  tanzania
tra-docs
TRA Documentation
Stars: ✭ 15 (-68.09%)
Mutual labels:  tanzania
pesa-js
Pesa SDK
Stars: ✭ 19 (-59.57%)
Mutual labels:  tanzania
Plagiarism-checker-Python
A python project for checking plagiarism of documents based on cosine similarity
Stars: ✭ 114 (+142.55%)
Mutual labels:  tanzania
php-pesa
Open payment integration toolkit for PHP
Stars: ✭ 26 (-44.68%)
Mutual labels:  tanzania

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_detail)
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 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, Just 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].