Skip to main content

Python SDK for the SignNow system

Project description

SignNow

SignNow Python SDK

About SignNow

SignNow is a powerful web-based e-signature solution that streamlines the signing process and overall document flow for businesses of any size. SignNow offers SaaS as well as public and private cloud deployment options using the same underlying API. With SignNow you can easily sign, share and manage documents in compliance with international data laws and industry-specific regulations. SignNow enables you to collect signatures from partners, employees and customers from any device within minutes.

API Contact Information

If you have questions about the SignNow API, please visit [https://help.signnow.com/docs](https://help.signnow.com/docs) or email [api@signnow.com](mailto:api@signnow.com).

See additional contact information at the bottom.

Installation

To install to Python library:

Download or clone the SignNow library and extract it into the location of your choice.

Navigate to the extracted file and run the following:

python setup.py install

Setup

import signnow_python_sdk

signnow_python_sdk.Config(client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET", environment="production")

Environments:
      production - https://api.signnow.com
      eval - https://api-eval.signnow.com

Examples

To run the examples you will need an API key. You can get one here [https://www.signnow.com/api](https://www.signnow.com/api). For a full list of accepted parameters, refer to the SignNow REST Endpoints API guide: [https://help.signnow.com/docs](https://help.signnow.com/docs).

OAuth2

Request OAuth Token

access_token = signnow_python_sdk.OAuth2.request_token("YOUR USERNAME", "YOUR PASSWORD")

Verify OAuth Token

access_token_verify = signnow_python_sdk.OAuth2.verify(AccessToken)

User

Create New User

new_user = signnow_python_sdk.User.create("name@domain.com", "newpassword", "Firstname", "Lastname")

Retreive User Account Information

sn_user = signnow_python_sdk.User.get(access_token)

Document

Get Document

# without annotations
document_data = signnow_python_sdk.Document.get(access_token, "YOUR_DOCUMENT_ID")

# with annotations
document_data = signnow_python_sdk.Document.get(access_token, "YOUR_DOCUMENT_ID", True)

Create New Document

dir_path = os.path.dirname(os.path.realpath(__file__)) + '/testing123.pdf'
doc_id = signnow_python_sdk.Document.upload(access_token, dir_path, False)

Create New Document and Extract the Fields

dir_path = os.path.dirname(os.path.realpath(__file__)) + '/testing123.pdf'
doc_id = signnow_python_sdk.Document.upload(access_token, dir_path)

Update Document

update_payload = {
    "texts": [
        {
            "size": 22,
            "x": 61,
            "y": 72,
            "page_number": 0,
            "font": "Arial",
            "data": "a sample text element",
            "line_height": 9.075,
            "client_timestamp": datetime.now().strftime("%s")
        }
    ],
    fields: [
        {
            "x": 10,
            "y: 10,
            "width": 122,
            "height": 34,
            "page_number": 0,
            "role": "Buyer",
            "required": True,
            "type": "signature"
        }
    ]
}

update_doc_res = signnow_python_sdk.Document.update(access_token, doc_id, update_payload)

Delete Document

delete_doc_res = signnow_python_sdk.Document.delete(access_token, doc_id)

Download Document

# without history
download_doc_res = signnow_python_sdk.Document.download(access_token, "YOUR DOCUMENT ID", "/", "sample")

# with history
download_doc_res = signnow_python_sdk.Document.download(access_token, "YOUR DOCUMENT ID", "/", "sample", True)

Send Free Form Invite

invite_payload = new
{
  "from": "account_email@domain.com",
  "to": "name@domain.com"
}

freeform_invite_res = signnow_python_sdk.Document.invite(access_token, "YOUR DOCUMENT ID", invite_payload)

Send Role-based Invite

invite_payload = {
  "to": [
    {
      "email": "name@domain.com",
      "role_id": "",
      "role": "Role 1",
      "order": 1,
      "authentication_type": "password",
      "password": "SOME PASSWORD",
      "expiration_days": 15,
      "reminder": 5
    },
    {
      "email": "name@domain.com",
      "role_id": "",
      "role": "Role 2",
      "order": 2,
      "authentication_type": "password",
      "password": "SOME PASSWORD",
      "expiration_days": 30,
      "reminder": 10
    }
  ],
  "from": "your_account_email@domain.com",
  "cc": [
    "name@domain.com"
  ],
  "subject": "YOUR SUBJECT",
  "message": "YOUR MESSAGE"
};

role_based_invite_res = signnow_python_sdk.Document.invite(access_token, "YOUR DOCUMENT ID", invite_payload)

Cancel Invite

cancel_invite_res = signnow_python_sdk.Document.cancel_invite(access_token, "YOUR DOCUMENT ID");

Merge Existing Documents

merge_doc_payload = {
  "name": "My New Merged Doc",
  "document_ids": ["YOUR DOCUMENT ID", "YOUR DOCUMENT ID"]
}

merge_doc_res = signnow_python_sdk.Document.merge_and_download(access_token, mergeDocsObj, "/", "sample-merge");

Document History

doc_history_res = signnow_python_sdk.Document.get_history(access_token, "YOUR DOCUMENT ID");

Template

Create Template

new_template_res = signnow_python_sdk.Template.create(access_token, "YOUR DOCUMENT ID", "My New Template");

Copy Template

copy_template_res = signnow_python_sdk.Template.copy(access_token, "YOUR TEMPLATE ID", "My Copy Template Doc");

Folder

Filters

Values

signing-status

waiting-for-me, waiting-for-others, signed, pending

document-updated

datetime.now().strftime("%s")

document-created

datetime.now().strftime("%s")

Sort

Values

document-name

asc/desc

updated

asc/desc

created

asc/desc

Get users root folder

root_folder_Res = signnow_python_sdk.Folder.root_folder(access_token);

Get Folder

get_folder_res = signnow_python_sdk.Folder.get(access_token, "YOUR FOLDER ID");

Webhook

Create Webhook

Events

Description

document.create

Webhook is triggered when a document is uploaded to users account in SignNow

document.update

Webhook is triggered when a document is updated (fields added, text added, signature added, etc.)

document.delete

Webhook is triggered when a document is deleted from

invite.create

Webhook is triggered when an invitation to a SignNow document is created.

invite.update

Webhook is triggered when an invite to Signnow document is updated. Ex. A signer has signed the document.

createWebhookRes = signnow_python_sdk.Webhook.create(access_token, "document.create", "YOUR URL");

List Webhooks

list_webhooks_res = signnow_python_sdk.Webhook.list_all(access_token);

Delete Webhook

delete_webhook_res = signnow_python_sdk.Webhook.delete(AccessToken, "YOUR WEBHOOK ID");

Additional Contact Information

SUPPORT

To contact SignNow support, please email [support@signnow.com](mailto:support@signnow.com).

SALES

For pricing information please call (800) 831-2050 or email [sales@signnow.com](mailto:sales@signnow.com).

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

signnow_python_sdk-2.0.tar.gz (16.1 kB view details)

Uploaded Source

File details

Details for the file signnow_python_sdk-2.0.tar.gz.

File metadata

  • Download URL: signnow_python_sdk-2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6

File hashes

Hashes for signnow_python_sdk-2.0.tar.gz
Algorithm Hash digest
SHA256 5d2536db98c11d54264a6860ec53fb8c74fec40bc52c688dd4a34f16e17597c4
MD5 7764ca0b32839b46807dd05b737e8225
BLAKE2b-256 dd580abbc769b539032ac4fd1b587bd0456b9e84ca5123cd4f849081aa963ea9

See more details on using hashes here.

Supported by

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