Skip to main content

RightSignature API written in python

Project description

RightSignature API written in Python

by Anton Kaiser

pip install RightSignature

Get the API-Key from here called "Secure Token"

Initialize

from rightsignature import *
API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
RightSignature = RightSignature.CRightSignature(API_KEY)
if not RightSignature.isLoggedIn():
	print("Wrong API Key!")
	exit(0)

Get the Document Array

for document in RightSignature.getDocuments(): // get the Array
	document = RightSignature.getDocument(document.getGuid()) // get the full Object

download a signed PDF

RightSignature.downloadSignedPDF(document,"./" + document.getGuid() + '.pdf')

Classes/Objects

CRightSignature:
getDocuments(date="alltime", debug=False) - Returns a CDocument Array - the CDocument is not full filled!
	date: 'today', 'thisweek', 'thismonth', 'alltime'
			or a date in the format 'yyyy-mm-dd'
	debug: Print debug logs
	hint: the script loads all pages!
getDocument(documentGUID) - Returns a full CDocument
downloadSignedPDF(CDocument, location, debug=False) - Returns a void
	debug: prints a message when a download failed
	hint: when a download fails, the script will redownload the file
isLoggedIn() - Returns a boolean
CDocument:
getAuditTrails() - Returns a CAudiot Array
getCallbackLocation() - Returns a String
getCompletedAt() - Returns a String
getContentType() - Returns a String
getCreatedAt() - Returns a String
getExpiresOn() - Returns a String
getFormFields() - Returns a CField Array
getGuid() - Returns a String
isTrashed() = Returns a boolean
getLargeUrl() - Returns a String
getLastActivityAt() - Returns a String
getMergeState() - Returns a String
getMessage() - Returns a String
getOriginalFilename() - Returns a String
getOriginalUrl() - Returns a String
getPages() - Returns a CPage Array
getPdfUrl() - Returns a String
getProcessingState() - Returns a String
getRecipients() - Returns a CRecipient Array
getSignedPdfChecksum() - Returns a String
getSignedPdfUrl() - Returns a String
getSize() - Returns a String
getState() - Returns a String
getSubject() - Returns a String
getTags() - Returns a String
getThumbnailUrl() - Returns a String
CAudit:
getKeyword() - Returns a String
getMessage() - Returns a String
getTimestamp() - Returns a String
CRecipient:
getCompletedAt() - Returns a String
getDocumentRoleID() - Returns a String
getEmail() - Returns a String
isSender() - Returns a String
getMustSign() - Returns a String
getName() - Returns a String
getRoleID() - Returns a String
getState() - Returns a String
getViewedAt() - Returns a String
CPage:
getOriginalTemplateFilename() - Returns a String
getOriginalTemplateGUID() - Returns a String
getPageNumber() - Returns a String
CField:
getID() - Returns a String
getName() - Returns a String
getPage() - Returns a String
getRoleID() - Returns a String
getValue() - Returns a String

Example:

for document in RightSignature.getDocuments():
	document = RightSignature.getDocument(document.getGuid())
	print("")
	print("=====================================================")
	print("===========" + document.getGuid() + " | " + document.getState() + "===========")
	print("=====================================================")
	name = document.getOriginalFilename().replace(".pdf","").replace("-","_")
	if len(document.getFormFields()) > 0:
		print("Document is ready!")
		print("Downloading...")
		RightSignature.downloadSignedPDF(document,"./" + document.getGuid() + '.pdf')
	else:
		print("Still on " + document.getState())
		print("User opened the document last time at the: " + document.getLastActivityAt())
	print("=====================================================")


Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

rightsignature-1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file rightsignature-1.1-py3-none-any.whl.

File metadata

  • Download URL: rightsignature-1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for rightsignature-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8252dcde11b6cb3a58e43737c245246799f249d4d69422c85a6f35635ad13bfd
MD5 1c7de0db8a033037592d0c3cd27fd9de
BLAKE2b-256 349cf9fa55f2007a0458299088588a1bae22559f6b6d170403757ad8f5dcf65f

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