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:
pip install signnow-python-sdk
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");
Link
Create Link
create_link_res = signnow_python_sdk.Link.create(access_token, "YOUR DOCUMENT ID");
LICENSE
This project is released under the Apache 2.0 [License](https://github.com/signnow/SNPythonSDK/blob/master/LICENSE.md).
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
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
File details
Details for the file signnow_python_sdk-2.0.1.tar.gz
.
File metadata
- Download URL: signnow_python_sdk-2.0.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 335421f5daee298bb5b8aff47eb56783cf5b6ed7c043ddb7ec253d3cb22efe5b |
|
MD5 | f727c7c238acbabe89a710142a94f18e |
|
BLAKE2b-256 | d7c76382a052f036c6f807e8b17ef520039187c4554e8e577e9d161377a5ba7b |