Skip to main content

Official Python client for the ComplyCube API

Project description

ComplyCube Python Library

The official python library for integrating with the ComplyCube API.

Check out the API integration docs.

Check out the API reference.

Installation

pip install complycube

Requirements

  • Python 3.6+

Getting Started

import the client

from complycube import ComplyCubeClient

Initialise the ComplyCubeClient with the api key from your developer dashboard.

cc_api = ComplyCubeClient(api_key='test_....')

Create a new client and complete a standard check

input_client_dict = {
    'type':'person',
    'email':'a@b.com',
    'personDetails': {
        'firstName':'John',
        'lastName':'Smith'
    }
}
cc_client = cc_api.clients.create(**input_client_dict)
check = cc_api.checks.create(cc_client.id,'standard_screening_check')
print(check)

Search for clients with the first name "John"

for client in ccapi.clients.list(personDetails={'firstName','John'}):
    print(client.email)

The auto_list function will handle api paging automatically via a generator and return a native object.

for client in ccapi.clients.list(personDetails={'firstName','John'}):
    print(client.email)

Per-request Configuration

As we use the requests library you can set per request configuration by using key/value pairs of any available requests parameter.

Setting the timeout for client creation to 5 seconds

ccapi.clients.create(**input_client_dict, timeout=5)

Avoiding certification verification

ccapi.clients.create(**input_client_dict, verify=False)

We also support the following per request settings;

Passing a specific api key for a single request

ccapi.clients.create(**input_client_dict, api_key='test_...')

Setting number of retries to attempt

ccapi.clients.create(**input_client_dict, retries=5)

Configuring a Proxy

A proxy can be configured by passing in proxy object to the request:

proxies = {
  'https': 'http://10.10.1.10:1080',
}
ccapi.clients.create(**input_client_dict proxies=proxies)

For additional information, news and our latest blogs visit us at https://www.complycube.com/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

complycube-1.1.3.tar.gz (17.3 kB view hashes)

Uploaded Source

Built Distribution

complycube-1.1.3-py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 3

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