Skip to content

Commit e83ebda

Browse files
committed
Update to version 4.3.0 on 2026-10-31
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes. - New: Word templates (`template_type` `docx`). create_template makes one from a Word document (.docx, up to 50 MB) that you upload and pass as a `cache_id`, or pass as a `document_url` or `document_base64`; upload_template takes the file itself. update_template_document and upload_template_document replace its document the same ways. Each tag in the document, such as `{{ customer.name }}`, becomes a field. Each of them takes an OpenDocument text file (.odt) too, which DocSpring converts to a Word document. - New: a Word template's `output_format`, what its submissions make unless they set `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file) or `pdf`. create_template and upload_template require it, and update_template changes it. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected. - New: the `docx` and `odt` output formats, a Word template's filled-in Word document (`files.docx`) and OpenDocument file (`files.odt`, converted from the Word document). Add them to `output_formats` in create_submission or create_submission_batch to get more than one file, such as the Word document and the PDF. - generate_submission_files takes `pdf`, the PDF of a Word template's submission that didn't make one (converted from its Word document), `docx`, the Word document of one that made only its PDF (made again from its data and the template version it used), and `odt`, its OpenDocument file. None of them uses credits again. Until the new file is ready, its `state` in `files` is `pending`, and when it couldn't be made, its `error_message` says why. - A Word template's `document` is its Word document: `document.permanent_url` downloads it. Its `state` is `processed` once it's uploaded or downloaded (`downloading` or `download_failed` while a `document_url` downloads, `converting` or `conversion_failed` while an OpenDocument file is converted), and get_template_diff's `document_changed` says whether it was edited. - get_template_page_images returns a 409 for a Word template, whose pages are only laid out when a document is made. - create_template_preview previews Word templates too: images of the pages of the PDF that the template's Word document makes with your data. A DocSpring server that can't convert Word documents to PDF returns a 409.
1 parent e359657 commit e83ebda

498 files changed

Lines changed: 1092 additions & 959 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ keeps it.
9090

9191
- List methods return `data` and `next_cursor`: pass `next_cursor` as `cursor` to get the next page.
9292
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v2 without a new
93-
version. The model keeps a response field added to the API after this release in its `additional_properties` dict. The objects defined inside a model, such as a template's `document`, leave it out. Enum values in responses are strings, so a
94-
value added after this release comes back as it is: handle values you don't recognize.
93+
version. The model keeps a response field added to the API after this release in its `additional_properties` dict. The objects defined inside a model, such as a template's `document`, leave it out. An enum value added after this release comes
94+
back as the API sent it: handle values you don't recognize.

‎CHANGELOG.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
### 4.3.0 [October 31, 2026]
2+
3+
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.
4+
- New: Word templates (`template_type` `docx`). create_template makes one from a Word document (.docx, up to 50 MB)
5+
that you upload and pass as a `cache_id`, or pass as a `document_url` or `document_base64`; upload_template takes the
6+
file itself. update_template_document and upload_template_document replace its document the same ways. Each tag in
7+
the document, such as `{{ customer.name }}`, becomes a field. Each of them takes an OpenDocument text file (.odt)
8+
too, which DocSpring converts to a Word document.
9+
- New: a Word template's `output_format`, what its submissions make unless they set `output_formats`: `docx` (a Word
10+
document), `odt` (an OpenDocument file) or `pdf`. create_template and upload_template require it, and
11+
update_template changes it. A Word template that encrypts its PDFs makes PDFs, because Word documents and
12+
OpenDocument files can't be password-protected.
13+
- New: the `docx` and `odt` output formats, a Word template's filled-in Word document (`files.docx`) and OpenDocument
14+
file (`files.odt`, converted from the Word document). Add them to `output_formats` in create_submission or
15+
create_submission_batch to get more than one file, such as the Word document and the PDF.
16+
- generate_submission_files takes `pdf`, the PDF of a Word template's submission that didn't make one (converted from
17+
its Word document), `docx`, the Word document of one that made only its PDF (made again from its data and the
18+
template version it used), and `odt`, its OpenDocument file. None of them uses credits again. Until the new file is
19+
ready, its `state` in `files` is `pending`, and when it couldn't be made, its `error_message` says why.
20+
- A Word template's `document` is its Word document: `document.permanent_url` downloads it. Its `state` is `processed`
21+
once it's uploaded or downloaded (`downloading` or `download_failed` while a `document_url` downloads, `converting`
22+
or `conversion_failed` while an OpenDocument file is converted), and get_template_diff's `document_changed` says
23+
whether it was edited.
24+
- get_template_page_images returns a 409 for a Word template, whose pages are only laid out when a document is made.
25+
- create_template_preview previews Word templates too: images of the pages of the PDF that the template's Word
26+
document makes with your data. A DocSpring server that can't convert Word documents to PDF returns a 409.
27+
128
### 4.2.0 [October 29, 2026]
229

330
- **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder

‎README.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# DocSpring Python SDK
22

33
The official Python client for the [DocSpring API](https://docspring.com/docs/api/). DocSpring fills PDF
4-
templates with your data, generates PDFs from HTML templates, combines PDFs and collects e-signatures.
4+
forms with your data, generates PDFs and Word documents from HTML and Word templates, combines PDFs and collects
5+
e-signatures.
56

67
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
78
[PyPI](https://pypi.org/project/docspring/) · [Changelog](https://github.com/DocSpring/docspring-python/blob/main/CHANGELOG.md)
89

910
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1011
pull requests are welcome.
1112

12-
Version 4.2.0. Requires Python >=3.10.
13+
Version 4.3.0. Requires Python >=3.10.
1314

1415
## Install and configure
1516

@@ -132,11 +133,11 @@ Python code for every method.
132133
| [`test_authentication`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#test_authentication) | Test authentication |
133134
| [`update_signature_request`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#update_signature_request) | Update a signature request |
134135
| [`update_template`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#update_template) | Update a template |
135-
| [`update_template_document`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#update_template_document) | Replace a template's PDF |
136+
| [`update_template_document`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#update_template_document) | Replace a template's document |
136137
| [`update_template_fields`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#update_template_fields) | Update a template's fields |
137138
| [`update_webhook`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#update_webhook) | Update a webhook |
138-
| [`upload_template`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#upload_template) | Create a PDF template from an uploaded PDF |
139-
| [`upload_template_document`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#upload_template_document) | Replace a template's PDF with an uploaded PDF |
139+
| [`upload_template`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#upload_template) | Create a template from an uploaded PDF or Word document |
140+
| [`upload_template_document`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#upload_template_document) | Replace a template's document with an uploaded file |
140141
| [`validate_submission`](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md#validate_submission) | Check a submission without creating it |
141142

142143
## Errors
@@ -154,7 +155,7 @@ existing code, such as removing or renaming a field, go in a new API version
154155
responses that are newer than it is:
155156

156157
- The model keeps a response field added to the API after this release in its `additional_properties` dict. The objects defined inside a model, such as a template's `document`, leave it out.
157-
- Enum values in responses are strings, so a value added to the API after this release comes back as it is: handle values you don't recognize.
158+
- An enum value added to the API after this release comes back as the API sent it: handle values you don't recognize.
158159

159160
Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-python/blob/main/CHANGELOG.md) lists
160161
what each release adds.

‎docs/AddTemplateFieldsRequest.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ add_template_fields_request_dict = add_template_fields_request_instance.to_dict(
2525
# create an instance of AddTemplateFieldsRequest from a dict
2626
add_template_fields_request_from_dict = AddTemplateFieldsRequest.from_dict(add_template_fields_request_dict)
2727
```
28-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
[[Back to Model list]](../README.md#methods) [[Back to API list]](../README.md#methods) [[Back to README]](../README.md)
2929

3030

‎docs/AiFieldNamingLanguage.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ The language AI field setup names a PDF template's fields in.
1010

1111
* `FORM_LANGUAGE` (value: `'form_language'`)
1212

13-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
[[Back to Model list]](../README.md#methods) [[Back to API list]](../README.md#methods) [[Back to README]](../README.md)
1414

1515

‎docs/AuthenticationCheck.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ authentication_check_dict = authentication_check_instance.to_dict()
2525
# create an instance of AuthenticationCheck from a dict
2626
authentication_check_from_dict = AuthenticationCheck.from_dict(authentication_check_dict)
2727
```
28-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
[[Back to Model list]](../README.md#methods) [[Back to API list]](../README.md#methods) [[Back to README]](../README.md)
2929

3030

‎docs/BarcodeSymbology.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ A kind of barcode.
2020

2121
* `PDF417` (value: `'pdf417'`)
2222

23-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
23+
[[Back to Model list]](../README.md#methods) [[Back to API list]](../README.md#methods) [[Back to README]](../README.md)
2424

2525

‎docs/CheckCharacter.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ A check mark or cross, as the HTML entity of its character: ✓ (`✓`),
1414

1515
* `AMPERSAND_HASH_10008_SEMICOLON` (value: `'✘'`)
1616

17-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17+
[[Back to Model list]](../README.md#methods) [[Back to API list]](../README.md#methods) [[Back to README]](../README.md)
1818

1919

0 commit comments

Comments
 (0)