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
Built Distribution
Hashes for complycube-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 135cffb871995609748177340c1631ca20209f858c0ce58b1ec901967f1ab019 |
|
MD5 | e667215dfe32a175c362be7e309c002e |
|
BLAKE2b-256 | 1316b19ed867424664878c76c6d8c1a29244a856bd0fa96029fc1315550b24c9 |