Python SDK for Privy Digital Signature
Project description
Privy Python SDK
Python SDK for Privy Digital Signature https://console.privy.id/
API Documentation
Please check Privy Api Reference.
Requirements
Python 3.7 or later
Installation
pip install privy-python-sdk
Usage
Initialization
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
)
Privy User Registration
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"
)
Get User's Registration Status
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")
Upload Document
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"
)
Get Document Status
Args:
doc_Tokenstring - Document's token
Returns:
Return reference https://console.privy.id/documentation#check-document-status
prv.document_status(
doc_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
)
update data
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" )
License
privy-python-sdk is released under the MIT License. Check License file for detail.
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 privy-python-sdk-1.0.4.tar.gz.
File metadata
- Download URL: privy-python-sdk-1.0.4.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.9.13 Linux/5.15.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abde89771ef0ea6ab6b1d92b8e2c07d96cc324af33fe82a8a137991b4e7e1c69
|
|
| MD5 |
91caffe70530dc790f1d6f008c7cf769
|
|
| BLAKE2b-256 |
8dc4ac50f2edcd886aa918b174413c52ced147dada1127d8df096ebfbff5ee25
|
File details
Details for the file privy_python_sdk-1.0.4-py3-none-any.whl.
File metadata
- Download URL: privy_python_sdk-1.0.4-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.15 CPython/3.9.13 Linux/5.15.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be381e0dbc1dcc21c471759636126e8cf82d2d93172ebd94f20c3d44fb53901e
|
|
| MD5 |
71240d43d2e87851b3078189646d4877
|
|
| BLAKE2b-256 |
81f9aa8aa856bea05a32bc404b6e9665684fbf2bc6449250d81a2c19f515f786
|