OST KYC SDK in python
Project description
OST KYC Python SDK
The official OST KYC SDK.
Requirements
To use this node module, developers will need to:
- Login on https://kyc.ost.com/admin/login.
- Obtain an API Key and API Secret from https://kyc.ost.com/admin/settings/developer-integrations.
Documentation
Installation
Install OST KYC Python SDK
> pip install ost_kyc_sdk_python
Example Usage
Require the SDK:
import ost_kyc_sdk_python
Initialize the SDK object:
// the latest valid API endpoint is "https://kyc.sandboxost.com", this may change in the future
kyc_sdk = ost_kyc_sdk_python.Services({'api_key': <api_key>, 'api_secret': <api_secret>, 'api_base_url': <api_secret>,
'config': {'timeout': <desired_timeout_in_secs> }})
Here timeout for requests can be passed inside config, timeout is in seconds (default is 15 secs).
Users Module
users_service = kyc_sdk.services.users
Create a new user:
r = users_service.create({'email': 'alice+1@ost.com'})
print (r)
Get an existing user:
r = users_service.get({'id': '11003'})
print (r)
Get a list of users and other data:
r = users_service.list()
print (r)
Users KYC module
users_kyc_service = kyc_sdk.services.users_kyc
Submit KYC:
r = users_kyc_service.submit_kyc({'user_id': 11035, 'first_name':'aniket','last_name':'ayachit', 'birthdate':'21/12/1991', 'country':'india', 'nationality':'indian', 'document_id_number':'arqpa7659a','document_id_file_path':'2/i/016be96da275031de2787b57c99f1471', 'selfie_file_path':'2/i/9e8d3a5a7a58f0f1be50b7876521aebc', 'residence_proof_file_path':'2/i/4ed790b2d525f4c7b30fbff5cb7bbbdb', 'ethereum_address': '0xdfbc84ccac430f2c0455c437adf417095d7ad68e', 'estimated_participation_amount':'2', 'street_address':'afawfveav ','city':'afawfveav', 'state':'afawfveav','postal_code':'afawfveav','investor_proof_files_path':['2/i/9ff6374909897ca507ba3077ee8587da', '2/i/4872730399670c6d554ab3821d63ebce']})
print (r)
List Users KYC:
r = users_kyc_service.list()
print (r)
Get Users KYC
r = users_kyc_service.get({'user_id':11003})
print (r)
Get PUT Presigned url
r = users_kyc_service.get_pre_signed_url_put ({'files': {
'residence_proof': 'application/pdf',
'investor_proof_file1': 'application/pdf',
'investor_proof_file2': 'application/pdf',
'document_id': 'image/jpeg',
'selfie': 'image/jpeg'
}})
print (r)
Get POST Presigned url
r = users_kyc_service.get_pre_signed_url_post ({'files': {
'residence_proof': 'application/pdf',
'investor_proof_file1': 'application/pdf',
'investor_proof_file2': 'application/pdf',
'document_id': 'image/jpeg',
'selfie': 'image/jpeg'
}})
print (r)
Send KYC approve email
r = users_kyc_service.email_approve({'user_id': 11003})
print (r)
Send KYC deny email
r = users_kyc_service.email_deny({'user_id': 11003})
print (r)
Send KYC report issue email
r = users_kyc_service.email_report_issue({'user_id': 11003})
print (r)
Users KYC details Module
users_kyc_details_service = kyc_sdk.services.users_kyc_details
Get user's kyc details
r = users_kyc_details_service.get({'user_id':11003})
print (r)
Validation Module
validator_service = kyc_sdk.services.validators
Verify ethereum address
r = validator_service.verify_ethereum_address({'ethereum_address': '0x32be343b94f860124dc4fee278fdcbd38c102d88'})
print (r)
Note: If user want to use non english characters in Python 2, write # -*- coding: utf-8 -*- at the beginning of the file.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ost_kyc_sdk_python-2.0.2.tar.gz.
File metadata
- Download URL: ost_kyc_sdk_python-2.0.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b88a06f08b8d2fad7c35b6a77bd0c4f9ff9a527819f450c45f0ccea98df26b7
|
|
| MD5 |
faf5134c19028d117c42a2f852c78151
|
|
| BLAKE2b-256 |
e54155948448bbfe9e353591c2c73c6b7f207e0f70e979b3c0add30e6fb477c4
|
File details
Details for the file ost_kyc_sdk_python-2.0.2-py3-none-any.whl.
File metadata
- Download URL: ost_kyc_sdk_python-2.0.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2cfb669f526dbeb3dd478adc2deb097b3d23c3836d8496864ee2e16c08bcda3
|
|
| MD5 |
079ad3cab7f6ba4c1ebc16f5e5dbb54d
|
|
| BLAKE2b-256 |
f36967f3cdc95f2178142efc33578b6e2482a1d11a0fc2c09d2ea4daab0b2142
|