# Privy Python SDK
Python SDK for Privy Digital Signature https://console.privy.id/
## API Documentation
Please check [Privy Api Reference](https://console.privy.id/documentation).
## Requirements
Python 3.7 or later
## Installation
```python
pip install privy-python-sdk
```
## Usage
### Initialization
```python
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**:
- `email` *string* - User's email
- `phone` *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 0
- `name` *string* - name of the user
- `date_of_birth` *string* - date of birth of the user (1983-01-02)
**Returns**: <br />
Return reference https://console.privy.id/documentation#registration
```python
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**:
- `token` *string* - User's token from Registration API
**Returns**: <br />
Return reference https://console.privy.id/documentation#check-registration-status
```python
prv.register_status(token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh")
```
### Upload Document
**Args**:
- `title` *string* - title of the document
- `document_path` *string* - path of the document
- `recipient` *string* - recipient of the document
- `owner` *string* - owner of the document
**Returns**: <br />
Return reference https://console.privy.id/documentation#upload-document
```python
prv.upload_document(
document_path="/upload/document.jpg",
title="foo bar",
recipient="LA1234"
)
```
### Get Document Status
**Args**:
- `doc_Token` *string* - Document's token
**Returns**: <br />
Return reference https://console.privy.id/documentation#check-document-status
```python
prv.document_status(
doc_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
)
```
### Update Data
for invalid or rejected user who wants to update their data and reregister
1. Update Data KTP
```python
prv.reregister_ktp(
ktp="/upload/ktp.jpg",
user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
)
```
2. Update Data Selfie
```python
prv.reregister_selfie(
selfie="/upload/selfie.jpg",
user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
)
```
3. Update Data File Support
```python
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/landx-id/privy-python-sdk",
"name": "privy-python-sdk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "privy,digital Signature,LandX",
"author": "LandX Engineering",
"author_email": "tech@landx.id",
"download_url": "https://files.pythonhosted.org/packages/1b/f9/bb249c9187b288d82eb567d0d0f1dff9d473781aff54585023cbdea4de87/privy_python_sdk-1.0.8.tar.gz",
"platform": null,
"description": "# Privy Python SDK\nPython SDK for Privy Digital Signature https://console.privy.id/\n\n\n## API Documentation\nPlease check [Privy Api Reference](https://console.privy.id/documentation).\n\n## Requirements\nPython 3.7 or later\n\n## Installation\n```python\npip install privy-python-sdk\n```\n## Usage\n\n### Initialization\n\n```python\nfrom privy_python_sdk.privy import Privy\n\nprv = Privy(\n privy_enterprise_token=\"key-123\",\n privy_merchant_key=\"xxxxxxxxxxxxx\",\n privy_username=\"foo\",\n privy_password=\"bar\",\n privy_id='TE1111',\n production=False\n)\n```\n### Privy User Registration\n**Args**:\n- `email` *string* - User's email\n- `phone` *string* - User's phone (e.g: 08233324223)\n- `selfie` *string* - Close up photo of registrant (.png, .jpg, or .jpeg)\n- `ktp` *string* - KTP Photo of the user (.png, .jpg, or .jpeg)\n- `nik` *string* - NIK must be 16 digits and the sixteenth digit can't be 0\n- `name` *string* - name of the user\n- `date_of_birth` *string* - date of birth of the user (1983-01-02)\n\n**Returns**: <br />\n Return reference https://console.privy.id/documentation#registration\n\n```python\nprv.register_user(\n date_of_birth=\"1983-01-02\",\n email=\"foo@bar.com\",\n ktp=\"/upload/ktp.jpg\",\n selfie=\"/upload/selfie.jpg\",\n name=\"foo bar\",\n nik=\"1234567891234567\",\n phone=\"08233324223\"\n)\n```\n\n### Get User's Registration Status\nCheck registration status of user.\n\n**Args**:\n- `token` *string* - User's token from Registration API\n\n**Returns**: <br />\n Return reference https://console.privy.id/documentation#check-registration-status\n\n```python\nprv.register_status(token=\"b3lkdfaoir0294058klkadfk45qeorlkldakfgh\")\n```\n\n### Upload Document\n**Args**:\n- `title` *string* - title of the document\n- `document_path` *string* - path of the document\n- `recipient` *string* - recipient of the document\n- `owner` *string* - owner of the document\n\n**Returns**: <br />\nReturn reference https://console.privy.id/documentation#upload-document\n\n```python\nprv.upload_document(\n document_path=\"/upload/document.jpg\",\n title=\"foo bar\",\n recipient=\"LA1234\"\n )\n```\n\n### Get Document Status\n**Args**:\n- `doc_Token` *string* - Document's token\n\n**Returns**: <br />\nReturn reference https://console.privy.id/documentation#check-document-status\n```python\nprv.document_status(\n doc_token=\"b3lkdfaoir0294058klkadfk45qeorlkldakfgh\"\n )\n```\n\n### Update Data\nfor invalid or rejected user who wants to update their data and reregister\n\n1. Update Data KTP\n ```python\n prv.reregister_ktp(\n ktp=\"/upload/ktp.jpg\",\n user_token=\"b3lkdfaoir0294058klkadfk45qeorlkldakfgh\"\n )\n ```\n\n2. Update Data Selfie\n ```python\n prv.reregister_selfie(\n selfie=\"/upload/selfie.jpg\",\n user_token=\"b3lkdfaoir0294058klkadfk45qeorlkldakfgh\"\n )\n ```\n\n3. Update Data File Support\n ```python\n prv.reregister_file_support(\n file_support=\"/upload/KK.jpg\",\n file_support_category=\"KK\",\n user_token=\"b3lkdfaoir0294058klkadfk45qeorlkldakfgh\"\n )\n ```\n## License\n\n**privy-python-sdk** is released under the MIT License. Check License file for detail.",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python SDK for Privy Digital Signature",
"version": "1.0.8",
"split_keywords": [
"privy",
"digital signature",
"landx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "77e25d12cd07e66f2ef4b1023d10b45662850d4c0b30742744999145c2efe24c",
"md5": "84e57f1130ff3c16838f5415825fc2c9",
"sha256": "fa603d13248adda823f247eb2ff0ff5901ff9e7eff91c92e319fe18604cc375e"
},
"downloads": -1,
"filename": "privy_python_sdk-1.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "84e57f1130ff3c16838f5415825fc2c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 4134,
"upload_time": "2023-02-08T06:46:55",
"upload_time_iso_8601": "2023-02-08T06:46:55.749733Z",
"url": "https://files.pythonhosted.org/packages/77/e2/5d12cd07e66f2ef4b1023d10b45662850d4c0b30742744999145c2efe24c/privy_python_sdk-1.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1bf9bb249c9187b288d82eb567d0d0f1dff9d473781aff54585023cbdea4de87",
"md5": "346c4543ce90c0f48718ba2d9fe82a89",
"sha256": "1b07f48a40ec5fb3b035447125df103b7827134501e37d929341ca731ac0b675"
},
"downloads": -1,
"filename": "privy_python_sdk-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "346c4543ce90c0f48718ba2d9fe82a89",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 3978,
"upload_time": "2023-02-08T06:46:57",
"upload_time_iso_8601": "2023-02-08T06:46:57.857178Z",
"url": "https://files.pythonhosted.org/packages/1b/f9/bb249c9187b288d82eb567d0d0f1dff9d473781aff54585023cbdea4de87/privy_python_sdk-1.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-08 06:46:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "landx-id",
"github_project": "privy-python-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "privy-python-sdk"
}