SignWell Python SDK
Python SDK for the SignWell API.
This package is generated from the SignWell OpenAPI spec by
Bidsketch/signwell-sdk-generator. Do not edit generated SDK runtime files
directly; make durable changes in the generator repo.
Installation
pip install signwell-sdk-python
With uv:
uv add signwell-sdk-python
Quick Start
import os
import signwell_sdk
from signwell_sdk.api.document_api import DocumentApi
configuration = signwell_sdk.Configuration(
api_key={"api_key": os.environ["SIGNWELL_API_KEY"]}
)
with signwell_sdk.ApiClient(configuration) as api_client:
documents = DocumentApi(api_client)
document = documents.get_document("document-id")
print(document.id)
The SDK sends the API key in the X-Api-Key header. The default host is
https://www.signwell.com.
Resources, Models, And Errors
The generated resource clients are available from their generated modules and from the parity namespace:
documents = signwell_sdk.Resources.DocumentApi(api_client)
model_cls = signwell_sdk.Models.DocumentResponse
not_found_cls = signwell_sdk.Errors.NotFoundError
Status-specific errors inherit from signwell_sdk.ApiException:
try:
documents.get_document("missing")
except signwell_sdk.Errors.NotFoundError as exc:
print(exc.status)
print(exc.data or exc.body)
Binary And JSON Responses
Some endpoints can return either JSON or binary data. The SDK selects the
correct Accept header from the mode parameters.
from signwell_sdk.api.bulk_send_api import BulkSendApi
from signwell_sdk.api.regional_api import RegionalApi
bulk_send = BulkSendApi(api_client)
csv_bytes = bulk_send.get_bulk_send_csv_template(
["00000000-0000-0000-0000-000000000000"]
)
csv_json = bulk_send.get_bulk_send_csv_template(
["00000000-0000-0000-0000-000000000000"],
var_base64=True,
)
documents = DocumentApi(api_client)
pdf_bytes = documents.get_completed_pdf("doc_123")
pdf_url = documents.get_completed_pdf("doc_123", url_only=True)
regional = RegionalApi(api_client)
certificate_bytes = regional.get_nom151_certificate("doc_123")
certificate_url = regional.get_nom151_certificate("doc_123", url_only=True)
certificate_object = regional.get_nom151_certificate("doc_123", object_only=True)
Embedded Helpers
doc = signwell_sdk.Embedded.create_signing_document(
name="NDA",
files=[{"name": "nda.pdf", "file_base64": "JVBERi0xLjQK"}],
recipients=[{"name": "Jane Doe", "email": "jane@example.com"}],
fields=[[{"x": 20, "y": 60, "page": 1, "type": "signature"}]],
options={"api_client": api_client},
)
url = signwell_sdk.Embedded.embedded_signing_url(doc)
Embedded signing documents must include fields for every recipient, set
with_signature_page=True, or set text_tags=True.
Webhook Verification
payload = request.json()
event = payload["event"]
signwell_sdk.Webhook.verify_event_or_raise(
event=event,
webhook_id=os.environ["SIGNWELL_WEBHOOK_ID"],
tolerance_seconds=300,
)
For side-effecting handlers, use replay-aware verification with an atomic store:
store = signwell_sdk.Webhook.MemoryReplayStore()
signwell_sdk.Webhook.verify_event_once_or_raise(
event=event,
webhook_id=os.environ["SIGNWELL_WEBHOOK_ID"],
tolerance_seconds=300,
replay_store=store,
)
MemoryReplayStore is intended for local development and single-process apps.
Production apps should use a shared atomic store such as Redis or a database
table with a uniqueness constraint.
Local Package Build
uv sync --dev
uv run pytest
uv build --no-sources
uv build --no-sources verifies that the source distribution and wheel can be
built from publishable package metadata.
Metadata
Release files for signwell-sdk-python 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| signwell_sdk_python-0.1.0.tar.gz | 89.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| signwell_sdk_python-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 308.7 kB
Release files / signwell_sdk_python-0.1.0.tar.gz
| Download URL | signwell_sdk_python-0.1.0.tar.gz |
|---|---|
| Size | 89.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afaea1d46df6518a977ecfa447beb0286a7a1d13dee9d51dae1c68d0afab76af
|
|
BLAKE2b-256 checksum How to use checksums |
cd33c948dcaa071c4ff798be6a623c86ff355263aed8aee5acc2dbf039f8e23e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / signwell_sdk_python-0.1.0-py3-none-any.whl
| Download URL | signwell_sdk_python-0.1.0-py3-none-any.whl |
|---|---|
| Size | 219.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbd476ac94290b7446aea9707e782aa55e775bb9ccb4ffcb5860ad89d75272bc
|
|
BLAKE2b-256 checksum How to use checksums |
6d87712ea9d295d3e970de2756802eb4e957c9b85fccca2ae70e4293cda6769f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|