Skip to main content

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:

  • 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:
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:

  • token string - 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:

  • 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:
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_Token string - 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

  1. Update Data KTP

    prv.reregister_ktp(
            ktp="/upload/ktp.jpg",
            user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
        )
    
  2. Update Data Selfie

    prv.reregister_selfie(
            selfie="/upload/selfie.jpg",
            user_token="b3lkdfaoir0294058klkadfk45qeorlkldakfgh"
        )
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

privy_python_sdk-1.0.8.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

privy_python_sdk-1.0.8-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file privy_python_sdk-1.0.8.tar.gz.

File metadata

  • Download URL: privy_python_sdk-1.0.8.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure

File hashes

Hashes for privy_python_sdk-1.0.8.tar.gz
Algorithm Hash digest
SHA256 1b07f48a40ec5fb3b035447125df103b7827134501e37d929341ca731ac0b675
MD5 346c4543ce90c0f48718ba2d9fe82a89
BLAKE2b-256 1bf9bb249c9187b288d82eb567d0d0f1dff9d473781aff54585023cbdea4de87

See more details on using hashes here.

File details

Details for the file privy_python_sdk-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: privy_python_sdk-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure

File hashes

Hashes for privy_python_sdk-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fa603d13248adda823f247eb2ff0ff5901ff9e7eff91c92e319fe18604cc375e
MD5 84e57f1130ff3c16838f5415825fc2c9
BLAKE2b-256 77e25d12cd07e66f2ef4b1023d10b45662850d4c0b30742744999145c2efe24c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page