# 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](https://www.docuseal.com/docs/api?lang=python).
## Requirements
Python 3.5 and later.
## Installation
```sh
pip install --upgrade docuseal
```
Install from source with:
```sh
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](https://console.docuseal.com/api).
```python
from docuseal import docuseal
docuseal.key = "API_KEY"
```
#### EU Cloud
API keys for the EU cloud can be obtained from your [EU DocuSeal Console](https://console.docuseal.eu/api).
```python
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.
```python
from docuseal import docuseal
docuseal.key = "API_KEY"
docuseal.url = "https://yourdocusealapp.com/api"
```
## API Methods
### list_submissions(params)
[Documentation](https://www.docuseal.com/docs/api?lang=python#list-all-submissions)
Provides the ability to retrieve a list of available submissions.
```python
docuseal.list_submissions({ "limit": 10 })
```
### get_submission(id)
[Documentation](https://www.docuseal.com/docs/api?lang=python#get-a-submission)
Provides the functionality to retrieve information about a submission.
```python
docuseal.get_submission(1001)
```
### create_submission(data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-submission)
This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).
**Related Guides:**<br>
[Send documents for signature via API](https://www.docuseal.com/guides/send-documents-for-signature-via-api)
[Pre-fill PDF document form fields with API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api)
```python
docuseal.create_submission({
"template_id": 1000001,
"send_email": True,
"submitters": [
{
"role": "First Party",
"email": "john.doe@example.com"
}
]
})
```
### create_submission_from_emails(data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#create-submissions-from-emails)
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.
```python
docuseal.create_submission_from_emails({
"template_id": 1000001,
"emails": "hi@docuseal.com, example@docuseal.com"
})
```
### archive_submission(id)
[Documentation](https://www.docuseal.com/docs/api?lang=python#archive-a-submission)
Allows you to archive a submission.
```python
docuseal.archive_submission(1001)
```
### list_submissions(params)
[Documentation](https://www.docuseal.com/docs/api?lang=python#list-all-submitters)
Provides the ability to retrieve a list of submitters.
```python
docuseal.list_submissions({ "limit": 10 })
```
### get_submitter(id)
[Documentation](https://www.docuseal.com/docs/api?lang=python#get-a-submitter)
Provides the functionality to retrieve information about a submitter.
```python
docuseal.get_submitter(500001)
```
### update_submitter(id, data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#update-a-submitter)
Allows you to update submitter details, pre-fill or update field values and re-send emails.
**Related Guides:**<br>
[Automatically sign documents via API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api#automatically_sign_documents_via_api)
```python
docuseal.update_submitter(500001, {
"email": "john.doe@example.com",
"fields": [
{
"name": "First Name",
"default_value": "Acme"
}
]
})
```
### list_submissions(params)
[Documentation](https://www.docuseal.com/docs/api?lang=python#list-all-templates)
Provides the ability to retrieve a list of available document templates.
```python
docuseal.list_submissions({ "limit": 10 })
```
### get_template(id)
[Documentation](https://www.docuseal.com/docs/api?lang=python#get-a-template)
Provides the functionality to retrieve information about a document template.
```python
docuseal.get_template(1000001)
```
### create_template_from_docx(data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-template-from-word-docx)
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](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:**<br>
[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)
```python
docuseal.create_template_from_docx({
"name": "Test DOCX",
"documents": [
{
"name": "string",
"file": "base64"
}
]
})
```
### create_template_from_html(data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-template-from-html)
Provides the functionality to seamlessly generate a PDF document template by utilizing the provided HTML content while incorporating pre-defined fields.
**Related Guides:**<br>
[Create PDF document fillable form with HTML](https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api)
```python
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](https://www.docuseal.com/docs/api?lang=python#merge-templates)
Allows you to merge multiple templates with documents and fields into a new combined template.
```python
docuseal.merge_templates({
"template_ids": [
321,
432
],
"name": "Merged Template"
})
```
### create_template_from_pdf(data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-template-from-existing-pdf)
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](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:**<br>
[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)
```python
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](https://www.docuseal.com/docs/api?lang=python#clone-a-template)
Allows you to clone existing template into a new template.
```python
docuseal.clone_template(1000001, {
"name": "Cloned Template"
})
```
### update_template(id, data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#update-a-template)
Provides the functionality to move a document template to a different folder and update the name of the template.
```python
docuseal.update_template(1000001, {
"name": "New Document Name",
"folder_name": "New Folder"
})
```
### update_template_documents(id, data)
[Documentation](https://www.docuseal.com/docs/api?lang=python#update-template-documents)
Allows you to add, remove or replace documents in the template with provided PDF/DOCX file or HTML content.
```python
docuseal.update_template_documents(1000001, {
"documents": [
{
"file": "string"
}
]
})
```
### archive_template(id)
[Documentation](https://www.docuseal.com/docs/api?lang=python#archive-a-template)
Allows you to archive a document template.
```python
docuseal.archive_template(1000001)
```
### Configuring Timeouts
Set timeouts to avoid hanging requests:
```ruby
docuseal.open_timeout = 30
docuseal.read_timeout = 30
```
## Support
For feature requests or bug reports, visit our [GitHub Issues page](https://github.com/docusealco/docuseal-python/issues).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Raw data
{
"_id": null,
"home_page": "https://github.com/docusealco/docuseal-python",
"name": "docuseal",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "docuseal document signature",
"author": "DocuSeal",
"author_email": "admin@docuseal.com",
"download_url": "https://files.pythonhosted.org/packages/9d/77/ac89e794ca08c1e782195c41be6f15b8226649d2e79d5e80bd585fdb0191/docuseal-1.0.3.tar.gz",
"platform": null,
"description": "# DocuSeal Python\n\nThe 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.\n\n## Documentation\n\nDetailed documentation is available at [DocuSeal API Docs](https://www.docuseal.com/docs/api?lang=python).\n\n## Requirements\n\nPython 3.5 and later.\n\n## Installation\n\n```sh\npip install --upgrade docuseal\n```\n\nInstall from source with:\n\n```sh\npython setup.py install\n```\n\n## Usage\n\n### Configuration\n\nSet up the library with your DocuSeal API key based on your deployment. Retrieve your API key from the appropriate location:\n\n#### Global Cloud\n\nAPI keys for the global cloud can be obtained from your [Global DocuSeal Console](https://console.docuseal.com/api).\n\n```python\nfrom docuseal import docuseal\n\ndocuseal.key = \"API_KEY\"\n```\n\n#### EU Cloud\n\nAPI keys for the EU cloud can be obtained from your [EU DocuSeal Console](https://console.docuseal.eu/api).\n\n```python\nfrom docuseal import docuseal\n\ndocuseal.key = \"API_KEY\"\ndocuseal.url = \"https://api.docuseal.eu\"\n```\n\n#### On-Premises\n\nFor on-premises installations, API keys can be retrieved from the API settings page of your deployed application, e.g., https://yourdocusealapp.com/settings/api.\n\n```python\nfrom docuseal import docuseal\n\ndocuseal.key = \"API_KEY\"\ndocuseal.url = \"https://yourdocusealapp.com/api\"\n```\n\n## API Methods\n\n### list_submissions(params)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#list-all-submissions)\n\nProvides the ability to retrieve a list of available submissions.\n\n\n```python\ndocuseal.list_submissions({ \"limit\": 10 })\n```\n\n### get_submission(id)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#get-a-submission)\n\nProvides the functionality to retrieve information about a submission.\n\n\n```python\ndocuseal.get_submission(1001)\n```\n\n### create_submission(data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-submission)\n\nThis API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).\n\n**Related Guides:**<br>\n[Send documents for signature via API](https://www.docuseal.com/guides/send-documents-for-signature-via-api)\n[Pre-fill PDF document form fields with API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api)\n\n\n```python\ndocuseal.create_submission({\n \"template_id\": 1000001,\n \"send_email\": True,\n \"submitters\": [\n {\n \"role\": \"First Party\",\n \"email\": \"john.doe@example.com\"\n }\n ]\n})\n```\n\n### create_submission_from_emails(data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#create-submissions-from-emails)\n\nThis 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.\n\n\n```python\ndocuseal.create_submission_from_emails({\n \"template_id\": 1000001,\n \"emails\": \"hi@docuseal.com, example@docuseal.com\"\n})\n```\n\n### archive_submission(id)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#archive-a-submission)\n\nAllows you to archive a submission.\n\n\n```python\ndocuseal.archive_submission(1001)\n```\n\n### list_submissions(params)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#list-all-submitters)\n\nProvides the ability to retrieve a list of submitters.\n\n\n```python\ndocuseal.list_submissions({ \"limit\": 10 })\n```\n\n### get_submitter(id)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#get-a-submitter)\n\nProvides the functionality to retrieve information about a submitter.\n\n\n```python\ndocuseal.get_submitter(500001)\n```\n\n### update_submitter(id, data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#update-a-submitter)\n\nAllows you to update submitter details, pre-fill or update field values and re-send emails.\n\n**Related Guides:**<br>\n[Automatically sign documents via API](https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api#automatically_sign_documents_via_api)\n\n\n```python\ndocuseal.update_submitter(500001, {\n \"email\": \"john.doe@example.com\",\n \"fields\": [\n {\n \"name\": \"First Name\",\n \"default_value\": \"Acme\"\n }\n ]\n})\n```\n\n### list_submissions(params)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#list-all-templates)\n\nProvides the ability to retrieve a list of available document templates.\n\n\n```python\ndocuseal.list_submissions({ \"limit\": 10 })\n```\n\n### get_template(id)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#get-a-template)\n\nProvides the functionality to retrieve information about a document template.\n\n\n```python\ndocuseal.get_template(1000001)\n```\n\n### create_template_from_docx(data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-template-from-word-docx)\n\nProvides 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](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.\n\n**Related Guides:**<br>\n[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)\n\n\n```python\ndocuseal.create_template_from_docx({\n \"name\": \"Test DOCX\",\n \"documents\": [\n {\n \"name\": \"string\",\n \"file\": \"base64\"\n }\n ]\n})\n```\n\n### create_template_from_html(data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-template-from-html)\n\nProvides the functionality to seamlessly generate a PDF document template by utilizing the provided HTML content while incorporating pre-defined fields.\n\n**Related Guides:**<br>\n[Create PDF document fillable form with HTML](https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api)\n\n\n```python\ndocuseal.create_template_from_html({\n \"html\": \"\"\"<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\\\"Industry\\\"\n role=\\\"First Party\\\"\n required=\\\"false\\\"\n style=\\\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\\\">\n</text-field>\nand typesetting industry</p>\n\"\"\",\n \"name\": \"Test Template\"\n})\n```\n\n### merge_templates(data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#merge-templates)\n\nAllows you to merge multiple templates with documents and fields into a new combined template.\n\n\n```python\ndocuseal.merge_templates({\n \"template_ids\": [\n 321,\n 432\n ],\n \"name\": \"Merged Template\"\n})\n```\n\n### create_template_from_pdf(data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#create-a-template-from-existing-pdf)\n\nProvides 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](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.\n\n**Related Guides:**<br>\n[Use embedded text field tags to create a fillable form](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form)\n\n\n```python\ndocuseal.create_template_from_pdf({\n \"name\": \"Test PDF\",\n \"documents\": [\n {\n \"name\": \"string\",\n \"file\": \"base64\",\n \"fields\": [\n {\n \"name\": \"string\",\n \"areas\": [\n {\n \"x\": 0,\n \"y\": 0,\n \"w\": 0,\n \"h\": 0,\n \"page\": 1\n }\n ]\n }\n ]\n }\n ]\n})\n```\n\n### clone_template(id, data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#clone-a-template)\n\nAllows you to clone existing template into a new template.\n\n\n```python\ndocuseal.clone_template(1000001, {\n \"name\": \"Cloned Template\"\n})\n```\n\n### update_template(id, data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#update-a-template)\n\nProvides the functionality to move a document template to a different folder and update the name of the template.\n\n\n```python\ndocuseal.update_template(1000001, {\n \"name\": \"New Document Name\",\n \"folder_name\": \"New Folder\"\n})\n```\n\n### update_template_documents(id, data)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#update-template-documents)\n\nAllows you to add, remove or replace documents in the template with provided PDF/DOCX file or HTML content.\n\n\n```python\ndocuseal.update_template_documents(1000001, {\n \"documents\": [\n {\n \"file\": \"string\"\n }\n ]\n})\n```\n\n### archive_template(id)\n\n[Documentation](https://www.docuseal.com/docs/api?lang=python#archive-a-template)\n\nAllows you to archive a document template.\n\n\n```python\ndocuseal.archive_template(1000001)\n```\n\n### Configuring Timeouts\n\nSet timeouts to avoid hanging requests:\n\n```ruby\ndocuseal.open_timeout = 30\ndocuseal.read_timeout = 30\n```\n\n## Support\n\nFor feature requests or bug reports, visit our [GitHub Issues page](https://github.com/docusealco/docuseal-python/issues).\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "DocuSeal Python API client",
"version": "1.0.3",
"project_urls": {
"Bug Tracker": "https://github.com/docusealco/docuseal-python/issues",
"Changes": "https://github.com/docusealco/docuseal-python/blob/master/CHANGELOG.md",
"Documentation": "https://www.docuseal.com/docs/api?lang=python",
"Homepage": "https://github.com/docusealco/docuseal-python",
"Source Code": "https://github.com/docusealco/docuseal-python"
},
"split_keywords": [
"docuseal",
"document",
"signature"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bf39e13c915e3588eeb16d296379983d7f6a2eb424b7de23aa0fb177e078ea61",
"md5": "34fdb61f02006925a0987d854f8f2762",
"sha256": "7da30e2c8b9d9c9d14127299cdbb368fc2afdfeead431a36cafb8451f96f79bc"
},
"downloads": -1,
"filename": "docuseal-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "34fdb61f02006925a0987d854f8f2762",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6770,
"upload_time": "2024-12-27T17:46:58",
"upload_time_iso_8601": "2024-12-27T17:46:58.504442Z",
"url": "https://files.pythonhosted.org/packages/bf/39/e13c915e3588eeb16d296379983d7f6a2eb424b7de23aa0fb177e078ea61/docuseal-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9d77ac89e794ca08c1e782195c41be6f15b8226649d2e79d5e80bd585fdb0191",
"md5": "5665592bba7a204a7ed77b362b9e161b",
"sha256": "f5dbac3b5999f311d2dc1663b809e27b763f0b144ac1d7d2fecda9c849013f84"
},
"downloads": -1,
"filename": "docuseal-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "5665592bba7a204a7ed77b362b9e161b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6782,
"upload_time": "2024-12-27T17:47:01",
"upload_time_iso_8601": "2024-12-27T17:47:01.326581Z",
"url": "https://files.pythonhosted.org/packages/9d/77/ac89e794ca08c1e782195c41be6f15b8226649d2e79d5e80bd585fdb0191/docuseal-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-27 17:47:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "docusealco",
"github_project": "docuseal-python",
"github_not_found": true,
"lcname": "docuseal"
}