Python bindings for the Prembly IdentityPass API
Project description
Prembly Identitypass PyPI version
The Python library for the Prembly Identitypass API.The Python library provides easy access to Prembly Identitypass API's from Django, Flask, and other Python apps. It abstracts the complexity involved in direct integration and allows you to make quick calls to the APIs.
Table of Contents
Install
pip install pyprembly
Note: This is currently under active development
Documentation
Getting Started
The package supports all Prembly Identitypass API endpoints for the following countries:
- Nigeria
- Kenya
- Ghana
- Sierra Leone
- South Africa
- Uganda
- Rwanda
Configuration
To use pyprembly you will need to set the following in your environment variable
PREMBLY_APP_ID="your application id"
PREMBLY_X_API_KEY="your x_app_key id"
PREMBLY_ENVIRONMENT="environment default to test"
Visit Prembly to get both app id and x-api-key
Country and Available method
The available method of the DataVerification
class are as follow:
Nigeria
from pyprembly.data.nigeria import DataVerification
Available methods are :
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | cac | Verify a business using rc_number |
2 | cac_with_name | Verify a business using rc_number |
3 | cac_advance | Verify a business using rc_number : return advance result |
4 | bvn_number | Verify a Bank Verification Number (BVN) |
5 | bvn_with_face | Verify a Bank Verification Number (BVN) using image and number |
6 | phone_number | Verify a Phone Number |
7 | banks_code | Get all banks code |
8 | bank_account | Verify bank account number |
9 | bank_account_comparison | Verify bank account number and compare name with customer name |
10 | all_bank_with_statement | Get all available banking institution that bank statement can be retrieve |
11 | advance_bank_account | Verify bank account number : return advance result |
12 | bank_account_with_name | Verify bank account number |
13 | voters_card_image | Verify voters card ID image |
14 | voters_card_lookup | Verify voters card number |
15 | basic_drivers_license | VVerify drivers license |
16 | advance_drivers_license | Verify drivers license : return advance result |
17 | image_drivers_license | Verify drivers license ID image |
18 | drivers_license_image | Verify drivers license ID image |
19 | international_passport | Verify international passport |
20 | international_passport_image | Verify international passport image |
21 | international_passport_with_face | Verify international passport image |
22 | international_passport_async | Verify international passport in an asynchronous manner |
23 | credit_bureau | Get Credit bureau statement |
24 | credit_bureau_customer | _Verify advance credit details of a user |
25 | credit_bureau_commercial | Verify advance credit details of a business |
26 | credit_bureau_commercial_basic | Verify basic credit details of a business |
27 | credit_bureau_statement | Verify basic credit details of a business |
28 | nin_slip | Verify a National Identification Number(NIN) Slip |
29 | nin_lookup | Verify a National Identification Number(NIN) with phone number and (NIN) number |
30 | nin_virtual | Verify a National Identification Number(NIN) with NIN and virtual number |
31 | nin_face | Verify a National Identification Number(NIN) with user's image |
32 | stamp_duty | Verify a stamp duty reference number |
33 | vehicle_verification | Verify a vehicle number plate |
34 | tax_identification_number | Verify tax identification number |
Ghana
from pyprembly.data.ghana import DataVerification
Available methods are:
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | drivers_license | Verify user drivers license |
2 | ssnit | Verify SSNIT |
3 | voters_card | Verify voters card |
4 | international_passport | Verify user passport |
Kenya
from pyprembly.data.kenya import DataVerification
Available methods are:
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | drivers_license | Verify user drivers license |
2 | international_passport | Verify user passport |
3 | serial_number | Verify user serial number |
4 | national_identity_number_new | Verify user national identity number |
5 | alien_id | Verify and authenticate foreign resident |
Sierra Leone
from pyprembly.data.sierra_leone import DataVerification
Available methods are:
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | drivers_license | Verify user drivers license |
2 | voters_card | Verify voters card |
South Africa
from pyprembly.data.south_africa import DataVerification
Available methods are:
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | national_id | Verify user national id card |
2 | company | Verify a business |
Uganda
from pyprembly.data.uganda import DataVerification
Available methods are:
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | company | Verify a business |
Rwanda
from pyprembly.data.rwanda import DataVerification
Available methods are:
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | passport | Verify Rwandan passport |
2 | national_id | Verify national identity card issued to Rwandan |
Global
from pyprembly.business import DataVerification
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | search_with_email | Verify a company using email |
2 | search_with_name | Verify a company using name |
3 | search_with_string | Verify a company |
4 | search_interpol_ban_list | Search an interpol ban list |
5 | search_company | Search for a company using email |
6 | verify_company | Verify a company information |
7 | vin_verification | Verify a VIN/CAR Identification Number |
8 | card_bin_verification | Verify a card BIN (Bank Identification Number) |
9 | email_verification | Verify an email address |
FACE VALIDATION
from pyprembly.face import DataVerification
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | age_and_gender | Get the age range and gender of a person in an image |
2 | comparison | Compare two face images |
3 | enrollment | Enroll user |
4 | authentication | Authenticate user using face |
5 | face_id | Verify user identity user against their registered image using their id card(Voters card, National ID, Card etc) |
6 | liveliness_check | Authenticate user with liveliness check on face |
RADAR
from pyprembly.radar import DataVerification
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | phone_intelligence | Get deep insight about a phone number |
2 | email_intelligence | Get deep insight about an email |
3 | ip_intelligence | Get deep insight about an IP |
DOCUMENT
from pyprembly.radar import DataVerification
SN | METHOD NAME | DESCRIPTION |
---|---|---|
1 | verify | Verify document image |
Calling Endpoints
To make a simple API call:
from pypyprembly.data.nigeria import DataVerification
try:
DataVerification().bank_account_verification()
except MissingAuthKeyError as e :
do something
except MissingRequiredDataError as e:
do something
except APIConnectionError as e:
do something
In this case you must have store your API keys in an environment variable.Alternatively you can also do
from pyprembly.data.nigeria import DataVerification
DataVerification(
prembly_app_id='your app id',
prembly_x_api_key='your x api key',
api_version='v2',
environment='live'
).bank_account_verification()
We recommend that you store your app id and x api key in an environment variable as PREMBLY_APP_ID and PREMBLY_X_API_KEY respectively.
Exceptions
There are only three exceptions that you can encounter while making API call.
MissingAuthKeyError
MissingAuthKeyError
tells that pyprembly could not find either your APP_ID or X_API_KEY in your environment variable or in class initialization. Class initialization approach:
MissingRequiredDataError
MissingRequiredDataError
tells that you do not provide a required data for the current method call.
APIConnectionError
APIConnectionError
tells that there is an issue communicating with Prembly API, it can happen due to poor internet connection or system permission
InvalidMethodError
InvalidMethodError
tells that the method used for calling the endpoint is not valid
0.0.4 (2023-4-17)
- LONG DESCRIPTION path not found fixed
0.0.3 (2023-4-3)
- Added Rwanda Dataverification class
- Added verification of Rwandan passport
- Added verification of Rwandan national identity
- Added verification of Social Security and National Insurance Trust(SSNIT) with face to Ghana DataVerification class
0.0.2 (2023-3-18)
- Added alien (foreign resident) verification method to kenya Dataverification class
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file pyprembly-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: pyprembly-0.0.4-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274989577eafe347518a9823b2cccc091f93b84dcc274c684ac237f6aa81dbd8 |
|
MD5 | d7116ce02e7ebe819dfe93afd2ec103a |
|
BLAKE2b-256 | d4f8e0acccacee40dab02b83633ca3948b7da6ab3b6cc74a4fd7e38aff335f6f |