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
File details
Details for the file complycube-1.1.6.tar.gz
.
File metadata
- Download URL: complycube-1.1.6.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85eb5c9f9457e7cd824559ad1b9740bebf8d5c3fbb34a2636aa80ea3c2e5a6a3 |
|
MD5 | ab20c499b40ee494a9123e87c68b1b97 |
|
BLAKE2b-256 | 1c6bcd5308b93920a84453016bc1692a4a2c8a60dc83b92a8bf16f6cd8a32af5 |
File details
Details for the file complycube-1.1.6-py3-none-any.whl
.
File metadata
- Download URL: complycube-1.1.6-py3-none-any.whl
- Upload date:
- Size: 30.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef8517ed901e062514b7b21a6600f47884a5f84fabc747aa0d97a3904925d81 |
|
MD5 | 7db8ec7ba591cd1d1d01ad0ec1b7d6b2 |
|
BLAKE2b-256 | 8327bed58db3689c42604a26aef6b5ed862910e2eb5ae2ddc707874b3c1b08b8 |