Skip to main content

Client library for mati.io

Project description

mati-python

Build Status Coverage Status PyPI

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.9.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mati-2.0.9-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file mati-2.0.9.tar.gz.

File metadata

  • Download URL: mati-2.0.9.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for mati-2.0.9.tar.gz
Algorithm Hash digest
SHA256 82e926d8fdbea46dd47e1b70ab0cc98a89222d099ac374057942f5cd5271867e
MD5 3ecd118f95f0cad3de4de2d15c53d7c7
BLAKE2b-256 d4c8154775d2261d41babf8db49c70cc6fb0e79516222e0af86b2336c3d01161

See more details on using hashes here.

File details

Details for the file mati-2.0.9-py3-none-any.whl.

File metadata

  • Download URL: mati-2.0.9-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for mati-2.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c888f5686134b50c2c298fff24ff3c28773d017a4609d1416cb3487096b53297
MD5 fbfd973cbd4d8995a5e59bfd61a127ea
BLAKE2b-256 151e914a9de9bf41078e684aefedb502b092d49cae645263b0eecd1703d7ea65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page