gotenberg-client
A Python client for interfacing with the Gotenberg API
What it is and what it does
gotenberg-client is a Python wrapper around the Gotenberg PDF generation and manipulation API. It abstracts away the HTTP boilerplate and multipart form-data handling, giving you a clean, type-safe interface to convert HTML files and URLs to PDF, merge or split PDFs, and apply formatting options like page orientation and PDF/A output formats. The client supports both synchronous and asynchronous workflows and lets you choose your HTTP backend (httpx with HTTP/2 support, niquests, or requests).
You install an HTTP backend extra alongside the package, then instantiate a client pointing to your Gotenberg server URL. Routes follow a fluent builder pattern: add files, configure options, call `.run()`, and write the result to disk or extract it. The package is fully typed with py.typed support, tested against a real Gotenberg server, and actively maintained. It requires Python 3.10 or later and a running Gotenberg instance to function.
Use it for:
- Convert HTML files with embedded CSS and images to PDF in a web application backend.
- Render web pages (URLs) to PDF on demand for reports or document generation.
- Merge multiple PDF files into a single document programmatically.
- Generate PDF/A-compliant archival documents with embedded metadata.
- Build async PDF pipelines in high-concurrency applications using the AsyncGotenbergClient.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A fully-typed Python client for the Gotenberg PDF generation API, supporting sync and async operations to convert HTML, URLs, and other documents to PDF via a remote Gotenberg server.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and provides a clean, well-typed interface to a powerful PDF service. Install it if you have a Gotenberg server running and need a Pythonic client to interact with it. The MPL-2.0 license is permissive for most use cases; review it if you plan to redistribute modified versions.
Install
gotenberg-client on PyPI
pip
pip install gotenberg-clientuv
uv add gotenberg-clientpoetry
poetry add gotenberg-clientInstalling gotenberg-client
Before you install
Low friction: pure Python wheel with a single runtime dependency (typing-extensions). Actively maintained with a release 7 days ago. Supports modern Python versions (3.10–3.14) and both CPython and PyPy.
License in practice
Distributed under MPL-2.0 (copyleft). You may use and modify the package freely, but derivative works must retain the same license and disclose source changes.
Quickstart
pip install "gotenberg-client[httpx]"
from gotenberg_client import GotenbergClient
from pathlib import Path
with GotenbergClient("http://localhost:3000") as client:
with client.chromium.html_to_pdf() as route:
response = route.index(Path("my-index.html")).run()
response.to_file(Path("my-index.pdf"))
Requires a running Gotenberg server (typically Docker-based) accessible at the configured URL.
Verify before relying
- Whether the package handles all Gotenberg API routes or if gaps remain (description mentions 'ask if you need a route').
- Performance characteristics and memory usage when processing large documents or concurrent requests.
Package facts
| License | MPL-2.0 (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,016/month — #10,888 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gotenberg_client-1.0.0-py3-none-any.whl
Keywords: api, api-client, document-conversion, gotenberg, html, html-to-pdf, pdf, pdf-generation
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
reductoaiA Python client library for the Reducto REST…
permissive · top 5,000 on PyPI
convertapiA Python client for the ConvertAPI online file…
permissive · top 15,000 on PyPI
django-wkhtmltopdfWraps the wkhtmltopdf binary to convert HTML to…
permissive · top 15,000 on PyPI
fpdfGenerates PDF documents from Python code,…
copyleft · top 5,000 on PyPI
wkhtmltopdfWraps the wkhtmltopdf command-line tool to…
permissive · top 15,000 on PyPI
pdfrwpdfrw reads, writes, and manipulates PDF files…
permissive · top 5,000 on PyPI
borbborb reads, writes, and manipulates PDF files…
agpl · top 15,000 on PyPI
weasyprintWeasyPrint converts HTML and CSS into PDF…
permissive · top 1,000 on PyPI
steel-sdkProvides a typed Python client for the Steel…
permissive · top 15,000 on PyPI
pdfservices-sdkClient library for Adobe PDF Services API,…
permissive · top 15,000 on PyPI