HelloSign Python SDK

4.0.0 · active · verified Fri Apr 17

A Python wrapper for the HelloSign API, enabling programmatic interaction with e-signature workflows. It supports document creation, signature requests, template management, and more. The current stable version is 4.0.0, and it follows an active release cadence for new features and maintenance.

Common errors

Warnings

Install

Imports

Quickstart

Initializes the HelloSign client using an API key (preferably from an environment variable) and then demonstrates how to fetch basic account information and list templates, including error handling.

import os
from hellosign_sdk import HSClient
from hellosign_sdk.exceptions import HSException

# Initialize the client with your API key
# It's recommended to use environment variables for sensitive data.
api_key = os.environ.get('HELLOSIGN_API_KEY', 'YOUR_API_KEY')

if not api_key or api_key == 'YOUR_API_KEY':
    print("Please set the HELLOSIGN_API_KEY environment variable or replace 'YOUR_API_KEY' with your actual key.")
else:
    client = HSClient(api_key=api_key)

    try:
        # Example: Get account information
        account = client.get_account()
        print(f"Successfully connected to HelloSign API. Account email: {account.email_address}")

        # Example: List available templates (first page)
        templates = client.get_templates(page=1, page_size=10)
        if templates:
            print(f"Found {len(templates)} templates. First template name: {templates[0].name}")
        else:
            print("No templates found for this account.")

    except HSException as e:
        print(f"HelloSign API Error: {e}")
    except Exception as e:
        print(f"An unexpected error occurred: {e}")

view raw JSON →