Skip to main content

DocuSeal Python API client

Project description

DocuSeal Python

The DocuSeal Python library provides seamless integration with the DocuSeal API, allowing developers to interact with DocuSeal's electronic signature and document management features directly within Python applications. This library is designed to simplify API interactions and provide tools for efficient implementation.

Documentation

Detailed documentation is available at DocuSeal API Docs.

Requirements

Python 3.5 and later.

Installation

pip install --upgrade docuseal

Install from source with:

python setup.py install

Usage

Configuration

Set up the library with your DocuSeal API key based on your deployment. Retrieve your API key from the appropriate location:

Global Cloud

API keys for the global cloud can be obtained from your Global DocuSeal Console.

from docuseal import docuseal

docuseal.key = "API_KEY"

EU Cloud

API keys for the EU cloud can be obtained from your EU DocuSeal Console.

from docuseal import docuseal

docuseal.key = "API_KEY"
docuseal.url = "https://api.docuseal.eu"

On-Premises

For on-premises installations, API keys can be retrieved from the API settings page of your deployed application, e.g., https://yourdocusealapp.com/settings/api.

from docuseal import docuseal

docuseal.key = "API_KEY"
docuseal.url = "https://yourdocusealapp.com/api"

API Methods

list_submissions(params)

Documentation

Provides the ability to retrieve a list of available submissions.

docuseal.list_submissions({ "limit": 10 })

get_submission(id)

Documentation

Provides the functionality to retrieve information about a submission.

docuseal.get_submission(1001)

create_submission(data)

Documentation

This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).

Related Guides:
Send documents for signature via API Pre-fill PDF document form fields with API

docuseal.create_submission({
  "template_id": 1000001,
  "send_email": True,
  "submitters": [
    {
      "role": "First Party",
      "email": "john.doe@example.com"
    }
  ]
})

create_submission_from_emails(data)

Documentation

This API endpoint allows you to create submissions for a document template and send them to the specified email addresses. This is a simplified version of the POST /submissions API to be used with Zapier or other automation tools.

docuseal.create_submission_from_emails({
  "template_id": 1000001,
  "emails": "hi@docuseal.com, example@docuseal.com"
})

archive_submission(id)

Documentation

Allows you to archive a submission.

docuseal.archive_submission(1001)

list_submissions(params)

Documentation

Provides the ability to retrieve a list of submitters.

docuseal.list_submissions({ "limit": 10 })

get_submitter(id)

Documentation

Provides the functionality to retrieve information about a submitter.

docuseal.get_submitter(500001)

update_submitter(id, data)

Documentation

Allows you to update submitter details, pre-fill or update field values and re-send emails.

Related Guides:
Automatically sign documents via API

docuseal.update_submitter(500001, {
  "email": "john.doe@example.com",
  "fields": [
    {
      "name": "First Name",
      "default_value": "Acme"
    }
  ]
})

list_submissions(params)

Documentation

Provides the ability to retrieve a list of available document templates.

docuseal.list_submissions({ "limit": 10 })

get_template(id)

Documentation

Provides the functionality to retrieve information about a document template.

docuseal.get_template(1000001)

create_template_from_docx(data)

Documentation

Provides the functionality to create a fillable document template for existing Microsoft Word document. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.docx for more text tag formats. Or specify the exact pixel coordinates of the document fields using fields param.

Related Guides:
Use embedded text field tags to create a fillable form

docuseal.create_template_from_docx({
  "name": "Test DOCX",
  "documents": [
    {
      "name": "string",
      "file": "base64"
    }
  ]
})

create_template_from_html(data)

Documentation

Provides the functionality to seamlessly generate a PDF document template by utilizing the provided HTML content while incorporating pre-defined fields.

Related Guides:
Create PDF document fillable form with HTML

docuseal.create_template_from_html({
  "html": """<p>Lorem Ipsum is simply dummy text of the
<text-field
  name=\"Industry\"
  role=\"First Party\"
  required=\"false\"
  style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">
</text-field>
and typesetting industry</p>
""",
  "name": "Test Template"
})

merge_templates(data)

Documentation

Allows you to merge multiple templates with documents and fields into a new combined template.

docuseal.merge_templates({
  "template_ids": [
    321,
    432
  ],
  "name": "Merged Template"
})

create_template_from_pdf(data)

Documentation

Provides the functionality to create a fillable document template for existing PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using fields param.

Related Guides:
Use embedded text field tags to create a fillable form

docuseal.create_template_from_pdf({
  "name": "Test PDF",
  "documents": [
    {
      "name": "string",
      "file": "base64",
      "fields": [
        {
          "name": "string",
          "areas": [
            {
              "x": 0,
              "y": 0,
              "w": 0,
              "h": 0,
              "page": 1
            }
          ]
        }
      ]
    }
  ]
})

clone_template(id, data)

Documentation

Allows you to clone existing template into a new template.

docuseal.clone_template(1000001, {
  "name": "Cloned Template"
})

update_template(id, data)

Documentation

Provides the functionality to move a document template to a different folder and update the name of the template.

docuseal.update_template(1000001, {
  "name": "New Document Name",
  "folder_name": "New Folder"
})

update_template_documents(id, data)

Documentation

Allows you to add, remove or replace documents in the template with provided PDF/DOCX file or HTML content.

docuseal.update_template_documents(1000001, {
  "documents": [
    {
      "file": "string"
    }
  ]
})

archive_template(id)

Documentation

Allows you to archive a document template.

docuseal.archive_template(1000001)

Configuring Timeouts

Set timeouts to avoid hanging requests:

docuseal.open_timeout = 30
docuseal.read_timeout = 30

Support

For feature requests or bug reports, visit our GitHub Issues page.

License

The gem is available as open source under the terms of the MIT License.

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

docuseal-1.0.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

docuseal-1.0.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file docuseal-1.0.4.tar.gz.

File metadata

  • Download URL: docuseal-1.0.4.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for docuseal-1.0.4.tar.gz
Algorithm Hash digest
SHA256 4f511214a8d2290267bd4efb85f025e2dc926301997962520b67722bcc77e2a0
MD5 e877c3ff6cd3675a85aaad071c20c93b
BLAKE2b-256 4aeca16fd571668ad072c8c6553356cedc8b08b8c67d1be189bcaa894afe0f99

See more details on using hashes here.

File details

Details for the file docuseal-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: docuseal-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for docuseal-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d43f5bba1c28bdc6286c4bc1f8b7f3b5f92aea71a061d1c9186491221fb87e52
MD5 ed22eaeba8b9d3f7c0dbca4ffc6ff5b4
BLAKE2b-256 633632855f52ac629ae3ba0ee41664428d94bdf449b5174cde79c55d7605c737

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