A Python wrapper for the HelloWorks API (https://portal.helloworks.com/)
Project description
helloworks-python-sdk 🐍
Easily create and manage HelloWorks workflow instances. 🚀
Installation
pip install helloworks-python-sdk
Initial setup
Go to your HelloWorks account and get your public key ID and your private key value
Remember to record the private key immediately and store it in a safe place. The private key value cannot be retrieved later, however keys can be generated at any time.
from helloworks import HwClient
client = HwClient(api_key_id, api_key_value)
- Note: Tokens will be refreshed and managed internally
- Note: Methods will return a dictionary of HW response
Create a workflow instance
Method to create an instance of a Workflow to send out to a user:
workflow_id = 'IDs located in API request info'
# Participants is a dictionary of dictionaries
participants = {'participant_QIxDNu': {'type': 'email',
'value': 'kevteg05@gmail.com',
'full_name': 'Kevin Hernandez'}}
# Merge fields is a dictionary of the available merge fields at Api request info
merge_fields = {'applicantName_f2GtnW': 'Kevin', 'jobTitle_WCUZlG': 'Test'}
response = client.create_workflow_instance(workflow_id, participants, merge_fields)
See the full list of available fields
Preview a workflow instance
Method to create a preview instance of a Workflow to send out to a user:
workflow_id = 'IDs located in API request info'
# Participants is a dictionary of dictionaries
participants = {'participant_QIxDNu': {'type': 'email',
'value': 'kevteg05@gmail.com',
'full_name': 'Kevin Hernandez'}}
# Merge fields is a dictionary of the available merge fields at Api request info
merge_fields = {'applicantName_f2GtnW': 'Kevin', 'jobTitle_WCUZlG': 'Test'}
response = client.create_workflow_instance(workflow_id, participants, merge_fields)
See the full list of available fields
Cancel a workflow instance
Cancel a Workflow Instance that is currently active
workflow_instance_id = 'ID returned by the creation of the workflow'
response = client.cancel_workflow_instance(workflow_instance_id)
Get a workflow instance
Retrieve information on a single Workflow Instance
workflow_instance_id = 'ID returned by the creation of the workflow'
response = client.get_workflow_instance(workflow_instance_id)
Get Workflow Instance Document [After workflow is completed]
Method to get a given document of a workflow instance
document_id = 'You can get the documents IDs after the workflow is finished (Using get_workflow_instance method'
workflow_instance_id = 'ID returned by the creation of the workflow'
request = client.get_workflow_instance_document(workflow_instance_id, document_id, get_request=True)
Note: By default this method will return the request, so you can do any process you might need with it, if you want the file to download in your directory use get_request=False instead.
Get Workflow Instance Audit Trail [After workflow is completed]
Method to get the audit trail of a workflow instance
workflow_instance_id = 'ID returned by the creation of the workflow'
request = client.get_workflow_instance_audit_trail(workflow_instance_id, get_request=True)
Note: By default this method will return the request, so you can do any process you might need with it, if you want the file to download in your directory use get_request=False instead.
Get Workflow Instance Documents [After workflow is completed]
Method to get the documents, in a zip file, of a workflow instance
workflow_instance_id = 'ID returned by the creation of the workflow'
request = client.get_workflow_instance_documents(workflow_instance_id, get_request=True)
Note: By default this method will return the request, so you can do any process you might need with it, if you want the file to download in your directory use get_request=False instead.
Get Workflow Instance Steps
Method to get the specified workflow instance, the step id, the role that will be completing the step, the signer's full name, and the unauthenticated url that can be used to start entering information.
workflow_instance_id = 'ID returned by the creation of the workflow'
response = client.get_workflow_instance_steps(workflow_instance_id)
Get Document Link
For the specified workflow instance, get the step id, the role that will be completing the step, the signer's full name, and the unauthenticated url that can be used to start entering information.
workflow_instance_id = 'ID returned by the creation of the workflow'
response = client.get_document_link(workflow_instance_id)
Get Authenticated Link for Workflow Instance's Step [Premium]
Method to get the authenticated link for a workflow instance step, to use it you need to have delegated authentication enabled and have launched this specific workflow instance with delegate authentication activated
workflow_instance_id = 'ID returned by the creation of the workflow'
step_id = 'You can get the step using the get_workflow_instance_steps method'
response = client.get_authenticated_link_for_workflow_instance_step(workflow_instance_id, step_id )
Note: This link is active for only 30 seconds
Save Settings with Logo File
NotImplemented JustYet Error
TODOs
- Create custom exceptions to improve error handling
- Manage responses as objects similar to what HelloSign SDK does
- Improve file management
- Save settings with logo file
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
Built Distribution
File details
Details for the file helloworks-python-sdk-0.4.tar.gz
.
File metadata
- Download URL: helloworks-python-sdk-0.4.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff13614a153e077c29b9c888476fa299d8a0bc5ebbb321b9b70cfeddb2ab9d1 |
|
MD5 | f4205fa9d43d61e4286ac9bbfd5bc30e |
|
BLAKE2b-256 | 294d495a654e71701d6d2afe21f2c7916a902df958fe677b61cdded121ec0887 |
File details
Details for the file helloworks_python_sdk-0.4-py3-none-any.whl
.
File metadata
- Download URL: helloworks_python_sdk-0.4-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3fcb051962f05db92fbf3df1d5caa910a3382e436f432e2a7dd321af11a0db5 |
|
MD5 | 3717edd9e176589823cec12bfb78590a |
|
BLAKE2b-256 | 543683b8e7a8b243533754fdbb56e9a0e4c49a99692a173948412c9840ad7d94 |