Client library for mati.io
Project description
mati-python
Mati Python3.6+ client library
Install
pip install mati
Testing
make venv
source venv/bin/activate
make test
Create Verification
from mati import Client
client = Client('api_key', 'secret_key')
verification = client.verifications.create(
'some_flow_id',
company_id='some_id',
)
Upload documents
from mati.types import (
PageType,
UserValidationFile,
ValidationInputType,
ValidationType,
)
# Load documents
front = open('ine_front.jpg', 'rb')
back = open('ine_back.jpg', 'rb')
live = open('liveness.mp4', 'rb')
# Create document with metadata
user_validation_file = UserValidationFile(
filename='ine_front.jpg',
content=front,
input_type=ValidationInputType.document_photo,
validation_type=ValidationType.national_id,
country='MX',
group=0, #The group is important when create your metamap
)
user_validation_file_back = UserValidationFile(
filename='ine_back.jpg',
content=back,
input_type=ValidationInputType.document_photo,
validation_type=ValidationType.national_id,
country='MX',
page=PageType.back,
group=0,
)
user_validation_live = UserValidationFile(
filename='liveness.MOV',
content=live,
input_type=ValidationInputType.selfie_video,
group=1,
)
# Send documentation for validation
resp = client.verifications.upload_validation_data(
[
user_validation_file,
user_validation_file_back,
user_validation_live,
],
verification.identity,
)
Verification status
Retrieve the verification when its complete
verification = client.verifications.retrieve('verification_id')
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 Distribution
mati-2.0.5.tar.gz
(12.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mati-2.0.5-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file mati-2.0.5.tar.gz.
File metadata
- Download URL: mati-2.0.5.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ec180df125dc56cbc21c5463d6b0d0426b3f4e8972d734f0cdec28216a8f0f4
|
|
| MD5 |
bde1433d53436fe026e3739ba5c2432d
|
|
| BLAKE2b-256 |
04604c0f1a3fdefbfea6a0f9ee3e3516306a43084b9e1343dff1851b8f321a53
|
File details
Details for the file mati-2.0.5-py3-none-any.whl.
File metadata
- Download URL: mati-2.0.5-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf4b698760a00f18dc35c4cced419202f044a5be8fd6fb30d3de8bf052c7c996
|
|
| MD5 |
a0e8447f5f4c116644eeb4d596f2b977
|
|
| BLAKE2b-256 |
08a5860299ecdb776df6cb60d9e6143f7928f171f6394e4f2a925ead63595f22
|