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

Uploaded Source

Built Distribution

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

complycube-1.1.8-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file complycube-1.1.8.tar.gz.

File metadata

  • Download URL: complycube-1.1.8.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for complycube-1.1.8.tar.gz
Algorithm Hash digest
SHA256 94df09f5043d62f725633b97b5c93e96dd48812e4c70e135614d0d2e5f6b5b42
MD5 6e8f12d9c9999a0801cb46bb54be51e3
BLAKE2b-256 e9b8070369712ef7be18c12d8586ba2aa1083ece66aa9ae6d37e69705010fa08

See more details on using hashes here.

File details

Details for the file complycube-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: complycube-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for complycube-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0c5fe18a2f7887e2bd404f19c91b1d56cb4b60b871644fa5eccf2217695a0e7c
MD5 4780056c7d7b15da36bce50573e99c02
BLAKE2b-256 19e44925ee44f0a3f06aa43d78afe2338a4b81639ee7816f0f5c9843246269b4

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