sdk
Python SDK
Runtime: Python 3.9, 3.10, 3.11, 3.12, 3.13
Install
pip install snappdf
Quickstart
from snappdf import SnapPdf
snap = SnapPdf(api_key=os.environ["SNAPPDF_API_KEY"], max_retries=5)
with open("a.pdf", "rb") as a, open("b.pdf", "rb") as b:
r = snap.pdf.merge(files=[a.read(), b.read()])
open("out.pdf", "wb").write(r["pdf"])Features
- · py.typed marker for strict type checkers (mypy, pyright)
- · requests-based transport with retry + timeout
- · Matching error hierarchy — catch RateLimitError, ValidationError, etc
- · Webhook verify_signature helper
Reference
Full API reference lives at /docs. Source + examples on GitHub.