{"id":9809,"library":"hellosign-python-sdk","title":"HelloSign Python SDK","description":"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.","status":"active","version":"4.0.0","language":"en","source_language":"en","source_url":"https://github.com/hellosign/hellosign-python-sdk","tags":["esignature","api","hellosign","document-management"],"install":[{"cmd":"pip install hellosign-python-sdk","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"HTTP client for API communication, automatically installed.","package":"requests","optional":false}],"imports":[{"note":"As of v4.0.0, the main client class was renamed from `Client` to `HSClient`.","wrong":"from hellosign_sdk import Client","symbol":"HSClient","correct":"from hellosign_sdk import HSClient"},{"note":"Base exception class for API errors.","symbol":"HSException","correct":"from hellosign_sdk.exceptions import HSException"}],"quickstart":{"code":"import os\nfrom hellosign_sdk import HSClient\nfrom hellosign_sdk.exceptions import HSException\n\n# Initialize the client with your API key\n# It's recommended to use environment variables for sensitive data.\napi_key = os.environ.get('HELLOSIGN_API_KEY', 'YOUR_API_KEY')\n\nif not api_key or api_key == 'YOUR_API_KEY':\n    print(\"Please set the HELLOSIGN_API_KEY environment variable or replace 'YOUR_API_KEY' with your actual key.\")\nelse:\n    client = HSClient(api_key=api_key)\n\n    try:\n        # Example: Get account information\n        account = client.get_account()\n        print(f\"Successfully connected to HelloSign API. Account email: {account.email_address}\")\n\n        # Example: List available templates (first page)\n        templates = client.get_templates(page=1, page_size=10)\n        if templates:\n            print(f\"Found {len(templates)} templates. First template name: {templates[0].name}\")\n        else:\n            print(\"No templates found for this account.\")\n\n    except HSException as e:\n        print(f\"HelloSign API Error: {e}\")\n    except Exception as e:\n        print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"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."},"warnings":[{"fix":"Update your import statement to `from hellosign_sdk import HSClient` and instantiate with `HSClient(...)`.","message":"The main client class was renamed from `Client` to `HSClient` in version 4.0.0. Code using `from hellosign_sdk import Client` will fail.","severity":"breaking","affected_versions":"4.0.0 and above"},{"fix":"Always pass a valid `api_key` or `oauth_token` to the `HSClient` constructor. For OAuth, ensure your `oauth_token` is refreshed as needed.","message":"Authentication methods typically require an API Key or OAuth token. Ensure your key/token is correctly configured and has the necessary permissions for the API calls you are making.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Wrap API calls in `try-except HSException as e: ...` blocks to handle issues like invalid parameters, missing permissions, or rate limits.","message":"API errors are raised as exceptions. It's crucial to implement `try-except` blocks to catch `hellosign_sdk.exceptions.HSException` to handle API-specific errors gracefully.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `pip install hellosign-python-sdk` in your terminal.","cause":"The `hellosign-python-sdk` package is not installed in your current Python environment.","error":"ModuleNotFoundError: No module named 'hellosign_sdk'"},{"fix":"Change your import from `from hellosign_sdk import Client` to `from hellosign_sdk import HSClient`.","cause":"You are trying to import the old client class name (`Client`) from a version 4.0.0 or newer installation.","error":"AttributeError: module 'hellosign_sdk' has no attribute 'Client'"},{"fix":"Verify your HelloSign API key from your HelloSign dashboard. Ensure no extra characters are included and that it's active.","cause":"The API key provided during client initialization is incorrect, expired, or has leading/trailing whitespace.","error":"hellosign_sdk.exceptions.HSException: The API Key is not valid. Please double check that you are using a valid API Key."}]}