Dataspike python client library
The official wrapper for Dataspike API
DataSpike KYC and AML API library is a powerful tool that allows developers to integrate KYC (Know Your Customer) and AML (Anti-Money Laundering) functionalities into their applications seamlessly. This library provides a simple and efficient way to perform identity verification, compliance checks, and risk assessment for individuals and businesses.
Support
If you encounter any issues or have any questions, feel free to reach out to our team at dev@dataspike.io. We're here to help!
Contributing
We welcome contributions from the community. If you have any improvements or bug fixes, please submit a pull request. For major changes, please open an issue first to discuss the proposed changes.
Installation
pip install dataspike
Getting started
Library offers well typed async API powered by pydantic and aiohttp.
from dataspike import *
async with Api("<YOUR_API_TOKEN>") as api:
verification = await api.verification.create()
await api.document.upload(verification.applicant_id, DocumentType.Passport, open('passport.jpg', 'rb'))
await api.document.upload(verification.applicant_id, DocumentType.Selfie, open('selfie.jpg', 'rb'))
await api.verification.proceed(verification.id)
applicants = await api.applicant.list()
verifications = await api.verification.list()
Resources
Full reference and documentation about available resources can be found at our official documentation
Currently library provides following resources
- AML
api.aml - Applicant
api.applicant - Verification
api.verification - SDK
api.sdk - Documents
api.document
Timeouts
Library uses aiohttp ClientSession. To pass timeouts use keyword arguments which will passed to ClientSession constructor
Check out aiohttp client reference for details.
Example
from dataspike import Api
async with Api('<API_TOKEN>', read_timeout=2) as api:
...
Errors
pydantic.ValidationErroris raised when type parameters not match with expected for API func.asyncio.TimeoutErroris raised if a timeout occurs.dataspike.errors.UnexpectedResponseStatusis raised whenever dataspike returns unexpected response status.
Sync API wrapper
We recommend use async api directly. But if you really want to use sync api
library offers SyncApi wrapper. Take note it build on top of async API
and still use asyncio under the hood.
Example
from dataspike import SyncApi
with SyncApi("<API_TOKEN>") as api:
applicants = api.applicant.list()
Release files for dataspike 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dataspike-0.1.4.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dataspike-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.3 kB
Release files / dataspike-0.1.4.tar.gz
| Download URL | dataspike-0.1.4.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac4b2e86153e87f5ef7a86a3902cf106784a38ee585a04575eb7a6e94eab0067
|
|
BLAKE2b-256 checksum How to use checksums |
34c143ab0391cc1b4914f859700d04453064ff40ccc6d71f154caef5eb479cf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.19.1 CPython/3.11.9 Linux/5.15.0-119-generic
|
Release files / dataspike-0.1.4-py3-none-any.whl
| Download URL | dataspike-0.1.4-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acd2ba52ccdffecbbde9d3c9f0b50b44d3fe727bb3bb7109f393302aeebd9ea3
|
|
BLAKE2b-256 checksum How to use checksums |
c1e93b26f57d0dc90a1436155fc0aaf75db1f789e3da5217837c94eab2aa20e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.19.1 CPython/3.11.9 Linux/5.15.0-119-generic
|