pyHanko
Tools for stamping and signing PDF files
Decision gist · record as of 2026-08-14
Yes. Active maintenance, permissive MIT license, low install friction, no known vulnerabilities, and a focused scope make this a solid choice for PDF signature work. The separation of CLI into a separate package keeps the library dependency footprint lean. Verify whether optional dependencies match your use case before installing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Certificate and key files needed for signing operations.
- Low install friction with a pure-wheel distribution.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-07-26 (19 days) · last repo commit 2026-08-14 · 754 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 9,006,390 downloads/mo, #1,567 on PyPI
Alternatives
Verify before relying
pip install pyhanko
from pyhanko.pdf_utils import writer
from pyhanko.sign import signers
# Sign a PDF with a certificate
signer = signers.SimpleSigner.load(...)
w = writer.PdfFileWriter()
w.sign(signers.PdfSignatureMetadata(field_name='Signature1'), signer=signer)- Whether optional dependencies (pkcs11, image-support, opentype, qr) are required for typical use cases or truly optional
- Performance characteristics when handling large PDF documents or batch signing operations
- Whether the library handles all PDF signature standards or has known limitations
What it is and what it does
pyHanko is a library for working with digital signatures in PDF documents. It handles signing, stamping, and validating PDF signatures according to standards like PAdES, and supports hardware tokens via PKCS#11. The library depends on cryptography, lxml, requests, and certificate validation tools to perform its core operations.
The package is designed for developers who need to integrate PDF signing into Python applications. It requires Python 3.10 or later and offers optional features for image handling, QR codes, and OpenType font support. The CLI functionality has been separated into a standalone package (pyhanko-cli), so this distribution focuses purely on the library API.
Use it for
- Add digital signatures to PDF documents programmatically in a Python application
- Validate existing PDF signatures to verify authenticity and integrity
- Implement PAdES-compliant signing workflows for legal or compliance requirements
- Integrate hardware security module (HSM) signing via PKCS#11 support
- Batch process PDF documents to apply timestamps or signatures at scale
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, permissive MIT license, low install friction, no known vulnerabilities, and a focused scope make this a solid choice for PDF signature work. The separation of CLI into a separate package keeps the library dependency footprint lean. Verify whether optional dependencies match your use case before installing.
Install
pyhanko on PyPI
Before you install
Low install friction with a pure-wheel distribution. Actively maintained with a recent release (19 days old) and steady commit activity. Supports modern Python versions (3.10 through 3.14).
Requires Python 3.10 or later. Certificate and key files needed for signing operations.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install pyhanko
from pyhanko.pdf_utils import writer
from pyhanko.sign import signers
# Sign a PDF with a certificate
signer = signers.SimpleSigner.load(...)
w = writer.PdfFileWriter()
w.sign(signers.PdfSignatureMetadata(field_name='Signature1'), signer=signer)
Verify before relying
- Whether optional dependencies (pkcs11, image-support, opentype, qr) are required for typical use cases or truly optional
- Performance characteristics when handling large PDF documents or batch signing operations
- Whether the library handles all PDF signature standards or has known limitations
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesasn1cryptotzlocalpyhanko-certvalidatorrequestscryptographylxml |
| Maintenance | Actively maintained 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 9,006,390 / month, #1,567 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Security :: CryptographyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: pyhanko-0.36.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pdf digital signature”
- pyHankopyHanko is a Python library for adding, validating, and managing…
- endesiveEndesive signs and verifies digital signatures in PDF, S/MIME email,…
- cursiveCursive validates digital signatures using OpenStack-specific logic,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also docusign-esign · endesive · PGPy13 · python-pkcs11 · securesystemslib · pyhanko-certvalidator · PyKCS11 · python-gnupg · truelayer-signing · sigstore