Python SDK for Privy Digital Signature https://console.privy.id/
Please check Privy Api Reference.
Python 3.7 or later
pip install privy-python-sdk
from 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:
email
string - User's emailphone
string - User's phone (e.g: 08233324223)selfie
string - Close up photo of registrant (.png, .jpg, or .jpeg)ktp
string - KTP Photo of the user (.png, .jpg, or .jpeg)nik
string - NIK must be 16 digits and the sixteenth digit can't be 0name
string - name of the userdate_of_birth
string - 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="[email protected]",
ktp="/upload/ktp.jpg",
selfie="/upload/selfie.jpg",
name="foo bar",
nik="1234567891234567",
phone="08233324223"
)
Check registration status of user.
Args:
token
string - User's token from Registration API
Returns:
Return reference https://console.privy.id/documentation#check-registration-status
prv.register_status(token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh")
Args:
title
string - title of the documentdocument_path
string - path of the documentrecipient
string - recipient of the documentowner
string - 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_Token
string - 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.