Skip to main content

OST KYC Python SDK

The official OST KYC SDK.

Requirements

To use this node module, developers will need to:

  1. Login on https://kyc.ost.com/admin/login.
  2. Obtain an API Key and API Secret from https://kyc.ost.com/admin/settings/developer-integrations.

Documentation

https://dev.ost.com/docs/kyc

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.

Metadata

Release files for ost-kyc-sdk-python 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ost-kyc-sdk-python 2.0.2
File Size Uploaded
ost_kyc_sdk_python-2.0.2.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ost-kyc-sdk-python 2.0.2
File Interpreter ABI Platform
ost_kyc_sdk_python-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / ost_kyc_sdk_python-2.0.2.tar.gz

Download URL ost_kyc_sdk_python-2.0.2.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0b88a06f08b8d2fad7c35b6a77bd0c4f9ff9a527819f450c45f0ccea98df26b7
BLAKE2b-256 checksum
How to use checksums
e54155948448bbfe9e353591c2c73c6b7f207e0f70e979b3c0add30e6fb477c4
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / ost_kyc_sdk_python-2.0.2-py3-none-any.whl

Download URL ost_kyc_sdk_python-2.0.2-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2cfb669f526dbeb3dd478adc2deb097b3d23c3836d8496864ee2e16c08bcda3
BLAKE2b-256 checksum
How to use checksums
f36967f3cdc95f2178142efc33578b6e2482a1d11a0fc2c09d2ea4daab0b2142
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page