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!
getDocumentsRange(dateStart="2019-01-25", dateEnd="2019-05-25", debug=False) - Returns a CDocument Array - the CDocument is not full filled!
dateStart/dateEnd: 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
Close
Hashes for rightsignature-1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb099e1800736bd52adb1ea40f5e52e20814ac67e012b1ab857364d804a74321 |
|
MD5 | cbb183dc04bf89d037de1636f60743d7 |
|
BLAKE2b-256 | 5d255fc24df21770b4a9014758d306e1676aff29ad5e4d68fdd4e8aa703a7dd1 |