Skip to main content

docspring

Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 3.1.0
  • Generator version: 7.16.0-DOCSPRING
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/DocSpring/docspring-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/DocSpring/docspring-python.git)

Then import the package:

import docspring

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import docspring

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import docspring
from docspring.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://sync.api.docspring.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = docspring.Configuration(
    host = "https://sync.api.docspring.com/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: api_token_basic
configuration = docspring.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with docspring.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = docspring.Client(api_client)
    template_id = 'tpl_1234567890abcdef02' # str | 
    data = docspring.AddFieldsData() # AddFieldsData | 

    try:
        # Add new fields to a Template
        api_response = api_instance.add_fields_to_template(template_id, data)
        print("The response of Client->add_fields_to_template:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling Client->add_fields_to_template: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://sync.api.docspring.com/api/v1

Class Method HTTP request Description
Client add_fields_to_template PUT /templates/{template_id}/add_fields Add new fields to a Template
Client batch_generate_pdfs POST /submissions/batches Generate multiple PDFs
Client combine_pdfs POST /combined_submissions Merge submission PDFs, template PDFs, or custom files
Client copy_template POST /templates/{template_id}/copy Copy a template
Client create_custom_file_from_upload POST /custom_files Create a new custom file from a cached S3 upload
Client create_data_request_event POST /data_requests/{data_request_id}/events Create a new event for emailing a signee a request for signature
Client create_data_request_token POST /data_requests/{data_request_id}/tokens Create a new data request token for form authentication
Client create_folder POST /folders/ Create a folder
Client create_html_template POST /templates?endpoint_variant=create_html_template Create a new HTML template
Client create_pdf_template POST /templates Create a new PDF template with a form POST file upload
Client create_pdf_template_from_upload POST /templates?endpoint_variant=create_template_from_cached_upload Create a new PDF template from a cached S3 file upload
Client create_webhook POST /webhooks Create a webhook
Client delete_folder DELETE /folders/{folder_id} Delete a folder
Client delete_template DELETE /templates/{template_id} Delete a template
Client delete_webhook DELETE /webhooks/{webhook_id} Delete a webhook
Client expire_combined_submission DELETE /combined_submissions/{combined_submission_id} Expire a combined submission
Client expire_submission DELETE /submissions/{submission_id} Expire a PDF submission
Client generate_pdf POST /templates/{template_id}/submissions Generate a PDF
Client generate_preview POST /submissions/{submission_id}/generate_preview Generate a preview PDF for partially completed data requests
Client get_combined_submission GET /combined_submissions/{combined_submission_id} Check the status of a combined submission (merged PDFs)
Client get_data_request GET /data_requests/{data_request_id} Look up a submission data request
Client get_full_template GET /templates/{template_id}?full=true Fetch the full attributes for a PDF template
Client get_presign_url GET /uploads/presign Get a presigned S3 URL for direct file upload
Client get_submission GET /submissions/{submission_id} Check the status of a PDF
Client get_submission_batch GET /submissions/batches/{submission_batch_id} Check the status of a submission batch job
Client get_template GET /templates/{template_id} Check the status of an uploaded template
Client get_template_model_code GET /templates/{template_id}/model_code Generate typed model code for a template
Client get_template_schema GET /templates/{template_id}/schema Fetch the JSON schema for a template
Client get_webhook GET /webhooks/{webhook_id} Get a webhook
Client list_combined_submissions GET /combined_submissions Get a list of all combined submissions
Client list_folders GET /folders/ Get a list of all folders
Client list_submissions GET /submissions List all submissions
Client list_template_submissions GET /templates/{template_id}/submissions List all submissions for a given template
Client list_templates GET /templates Get a list of all templates
Client list_webhooks GET /webhooks Get a list of all webhooks
Client move_folder_to_folder POST /folders/{folder_id}/move Move a folder
Client move_template_to_folder POST /templates/{template_id}/move Move Template to folder
Client publish_template_version POST /templates/{template_id}/publish_version Publish a template version
Client rename_folder POST /folders/{folder_id}/rename Rename a folder
Client restore_template_version POST /templates/{template_id}/restore_version Restore a template version
Client test_authentication GET /authentication Test authentication
Client update_data_request PUT /data_requests/{data_request_id} Update a submission data request
Client update_template PUT /templates/{template_id} Update a Template
Client update_template_document PUT /templates/{template_id}?endpoint_variant=update_template_pdf_with_form_post Update a template's document with a form POST file upload
Client update_template_document_from_upload PUT /templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload Update a template's document with a cached S3 file upload
Client update_webhook PUT /webhooks/{webhook_id} Update a webhook

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

api_token_basic

  • Type: HTTP basic authentication

Author

support@docspring.com

Metadata

Release files for docspring 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for docspring 3.1.0
File Interpreter ABI Platform
docspring-3.1.0-py3-none-any.whl Python 3 none any Details

Release files / docspring-3.1.0-py3-none-any.whl

Download URL docspring-3.1.0-py3-none-any.whl
Size 142.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e405eff7fba077cd190c4a3cbc07ed494afb45c34e064f36d9f4e80627b2fc1
BLAKE2b-256 checksum
How to use checksums
61c732564ba3c74ad720dec1d04c1318f1ef1a89799f11d902806290320454d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

3.1.0 This release

1 release file

3.0.0

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page