pdfRest Python SDK
Build production-grade PDF automation with the official Python SDK for pdfRest: a powerful PDF API platform for conversion, OCR, extraction, redaction, security, forms, and AI-ready document workflows.
- Homepage: pdfrest.com
- API docs: docs.pdfrest.com
- Python SDK docs: python.pdfrest.com
- API Lab: pdfrest.com/apilab
Why pdfRest
- Enterprise PDF quality powered by Adobe PDF Library technology.
- Fast onboarding with API Lab, code samples, and straightforward REST patterns.
- Chainable API workflows that let you pass outputs between calls.
- Deployment flexibility: Cloud, self-hosted on AWS, or self-hosted container.
- Security and compliance resources published in the trust center and product documentation.
Why this SDK
- Official typed Python interface to pdfRest (
PdfRestClientandAsyncPdfRestClient). - Pydantic-backed request/response models for safer integrations.
- High-level helpers for the endpoints teams use most in production.
- Consistent error handling, request customization, and file management helpers.
What you can build
Use this PDF API for workflows like:
- Convert and transform: PDF to Word/Excel/PowerPoint/PostScript/images/Markdown, and convert files to PDF/PDF-A/PDF-X.
- Generate PDFs: Markdown, plain text, JSON, XML, and CSV with page layout, typography, and tagging controls.
- Print workflows: PostScript/EPS to PDF with custom job options.
- Render protected PDFs: PNG/BMP/GIF/JPEG/TIFF output using the open password.
- Extract and analyze: OCR, text extraction, image extraction, PDF metadata.
- Add content: overlay text, images, lines, and rectangles on PDF pages.
- Secure and govern: redaction, encryption, permissions, signing, watermarking.
- Compose and optimize: merge/split, compress, flatten, rasterize, color conversion.
- Form operations: import/export form data, flatten forms, XFA to Acroforms.
Built for AI and LLM pipelines
pdfRest is especially useful for document AI systems:
- Convert PDFs to structured Markdown for downstream retrieval and training data prep.
- Extract clean text and metadata for indexing and chunking pipelines.
- Summarize and translate document content with API-native operations.
- Keep multi-step pipelines efficient by chaining outputs between operations.
Installation
pdfrest supports Python 3.10+.
With uv:
uv add pdfrest
With pip:
python -m pip install pdfrest
Quick start
Set your API key in PDFREST_API_KEY:
export PDFREST_API_KEY="your-api-key"
Run your script with uv:
uv run python your_script.py
Or with Python:
python your_script.py
Example (upload + extract text):
from pathlib import Path
from pdfrest import PdfRestClient
with PdfRestClient() as client:
uploaded = client.files.create_from_paths([Path("input.pdf")])[0]
result = client.extract_pdf_text(uploaded, full_text="document")
preview = ""
if result.full_text is not None and result.full_text.document_text is not None:
preview = result.full_text.document_text[:500]
print(preview)
Async example:
import asyncio
from pathlib import Path
from pdfrest import AsyncPdfRestClient
async def main() -> None:
async with AsyncPdfRestClient() as client:
uploaded = (await client.files.create_from_paths([Path("input.pdf")]))[0]
result = await client.extract_pdf_text(uploaded, full_text="document")
preview = ""
if result.full_text is not None and result.full_text.document_text is not None:
preview = result.full_text.document_text[:500]
print(preview)
asyncio.run(main())
Deployment options
- Cloud (default): use
PdfRestClient()withPDFREST_API_KEY. - Self-hosted: set
base_url="https://your-api-host"and keep the same Python SDK surface.
Learn more
- API toolkit overview: pdfrest.com
- Resources and insights: pdfrest.com/resources
- Example scripts: examples/README.md
- Python SDK docs: python.pdfrest.com
For contributors
See the contributing guide for development setup, checks, and contribution workflows.
License
This SDK is licensed under the Apache License, Version 2.0.
Metadata
Release files for pdfrest 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfrest-1.4.1.tar.gz | 78.9 kB | Without provenance | Details for pdfrest-1.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfrest-1.4.1-py3-none-any.whl | Python 3 | none | any | Details for pdfrest-1.4.1-py3-none-any.whl |
Total release size: 160.8 kB
Release files / pdfrest-1.4.1.tar.gz
| Download URL | pdfrest-1.4.1.tar.gz |
|---|---|
| Size | 78.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73094933a6069df0fc03dad8ba90d8d24290d4da08e6b2c5020843b4f8090f87
|
|
BLAKE2b-256 checksum How to use checksums |
e87a81b6424c515a92211b092c37c573b48ad7eebd08509c45ba96c272186648
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pdfrest-1.4.1-py3-none-any.whl
| Download URL | pdfrest-1.4.1-py3-none-any.whl |
|---|---|
| Size | 81.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cb0860ddcbdbbe58b6d31430c8a402857dca048786094d8191ca21ccd94f945
|
|
BLAKE2b-256 checksum How to use checksums |
91e8708a5cc5a1594b5c388152c1b0ae424bc25769ea43cb9a3bbeefaddb05f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pdfrest 1.4.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.