Printable SDK for Python
Official Python client for the Printable document-generation service integration API: templates, print-forms, batch rendering, document drafts and webhook verification — with HMAC request signing (simple and strict canonical modes) built in and byte-compatible with the server implementation.
Zero runtime dependencies (stdlib only). Python 3.10+. Server-side only — the secret key must never reach untrusted environments.
Install
pip install printable-api-sdk
Quick start
from printable_sdk import PrintableClient
client = PrintableClient(
base_url="https://printable.example.com",
token="erp-main-7f3a",
secret_key=os.environ["PRINTABLE_SECRET"],
salt=os.environ["PRINTABLE_SALT"],
strict=False, # True if the credential has "verify full payload hash" enabled
)
# Render a document
doc = client.print_form_create({
"template": "invoice",
"variables": {"company": {"name": "ACME Ltd"}},
"format": "link",
})
print(doc["link"])
# Batch with archive + email delivery
batch = client.print_form_batch({
"template": "certificate",
"items": [{"variables": {"name": "Alice"}}, {"variables": {"name": "Bob"}}],
"archive": True,
"deliver": {"email": "hr@example.com"},
})
status = client.print_form_batch_get(batch["uuid"])
API surface
template_list · template_contract · template_export ·
template_import · template_import_docx · print_form_create ·
print_form_get · print_form_rules · print_form_batch ·
print_form_batch_get · document_draft_create · document_draft_get ·
call(method, endpoint, params) (escape hatch).
Every method returns the decoded payload dict of the response envelope.
Errors (non-2xx or success: false) raise PrintableError with
.status, .error_key and the raw error .payload.
Webhooks
valid = client.verify_webhook(
raw_body, # raw request body string
request.headers["X-Printable-Signature"],
request.headers["X-Printable-Timestamp"],
)
Testing your integration
Inject a custom transport to stub HTTP:
client = PrintableClient(
...,
transport=lambda method, url, body: (200, '{"success":true,"payload":{"ok":true}}'),
)
License
MIT
Metadata
Release files for printable-api-sdk 1.0.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 | |
|---|---|---|---|
| printable_api_sdk-1.0.0.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| printable_api_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / printable_api_sdk-1.0.0.tar.gz
| Download URL | printable_api_sdk-1.0.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1332f2f8bb05965276eb120a38755f6cf6ede00726624fe82a4846e9428bdf7
|
|
BLAKE2b-256 checksum How to use checksums |
fe96418bf66563da1f4f9f26f234f9d957f6fd9aa80e9e04283c5631be510810
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency logRelease files / printable_api_sdk-1.0.0-py3-none-any.whl
| Download URL | printable_api_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d426c40d0e22766a18feac95c9496dc55b6f1a64ea44c93530cecafb1e9f4f9d
|
|
BLAKE2b-256 checksum How to use checksums |
3e2adbcdc9a2f4a5f110488fbe18cb602c07ecc8e844f658af92d870ee6ac280
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.
Transparency log