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

This version

2.0.6

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

Uploaded Source

Built Distribution

mati-2.0.6-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mati-2.0.6.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

Hashes for mati-2.0.6.tar.gz
Algorithm Hash digest
SHA256 c987962ebeccb8503e797c584a05108d50ca29f708e6a5839b4a8841ac37337c
MD5 333f6f653964711627ac8ae60c6178d1
BLAKE2b-256 70ba30651fb5235156afaaa5496808fb4e320546bb7e6dd43761b18b72e5588b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mati-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mati-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 22b21489b0993949f99ff2eb96d1c941934995c3beeb17328c71f499477035b6
MD5 69ea26c3a787b77750a2bb0851f95f32
BLAKE2b-256 dae87ab9c932651db3692aeaecba32e49667ec2c1a404b8677c4caf37c4aa5e9

See more details on using hashes here.

Supported by

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