Python SDK for Privy Digital Signature https://console.privy.id/
Please check Privy Api Reference.
Python 3.7 or later
pip install privy-python-sdkfrom privy_python_sdk.privy import Privy
prv = Privy(
privy_enterprise_token="key-123",
privy_merchant_key="xxxxxxxxxxxxx",
privy_username="foo",
privy_password="bar",
privy_id='TE1111',
production=False
)Args:
emailstring - User's emailphonestring - User's phone (e.g: 08233324223)selfiestring - Close up photo of registrant (.png, .jpg, or .jpeg)ktpstring - KTP Photo of the user (.png, .jpg, or .jpeg)nikstring - NIK must be 16 digits and the sixteenth digit can't be 0namestring - name of the userdate_of_birthstring - date of birth of the user (1983-01-02)
Returns:
Return reference https://console.privy.id/documentation#registration
prv.register_user(
date_of_birth="1983-01-02",
email="foo@bar.com",
ktp="/upload/ktp.jpg",
selfie="/upload/selfie.jpg",
name="foo bar",
nik="1234567891234567",
phone="08233324223"
)Check registration status of user.
Args:
tokenstring - User's token from Registration API
Returns:
Return reference https://console.privy.id/documentation#check-registration-status
prv.register_status(token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh")Args:
titlestring - title of the documentdocument_pathstring - path of the documentrecipientstring - recipient of the documentownerstring - owner of the document
Returns:
Return reference https://console.privy.id/documentation#upload-document
prv.upload_document(
document_path="/upload/document.jpg",
title="foo bar",
recipient="LA1234"
)Args:
doc_Tokenstring - Document's token
Returns:
Return reference https://console.privy.id/documentation#check-document-status
prv.document_status(
doc_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
)for invalid or rejected user who wants to update their data and reregister
-
Update Data KTP
prv.reregister_ktp( ktp="/upload/ktp.jpg", user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh" )
-
Update Data Selfie
prv.reregister_selfie( selfie="/upload/selfie.jpg", user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh" )
-
Update Data File Support
prv.reregister_file_support( file_support="/upload/KK.jpg", file_support_category="KK", user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh" )
privy-python-sdk is released under the MIT License. Check License file for detail.