pysequoia
Provides OpenPGP facilities using Sequoia-PGP library
What it is and what it does
PySequoia is a Python binding to the Sequoia PGP library that enables OpenPGP operations—signing, verification, encryption, and decryption—using the IETF standardized protocol. It exposes high-level functions for working with PGP certificates and signatures, supporting both in-memory and file-based workflows. The library handles armored output formats and can work with password-protected keys.
The package is implemented as a Rust extension compiled to native wheels for multiple architectures and operating systems. It has no Python runtime dependencies, making it lightweight to deploy. The API is documented as a work-in-progress and not yet stable, so breaking changes may occur between minor versions.
Use it for:
- Sign and verify documents or messages in applications that need to prove authorship or detect tampering.
- Encrypt sensitive data to one or more PGP recipients without relying on external GnuPG binaries.
- Decrypt PGP-encrypted files or messages received from users or external systems.
- Build secure communication pipelines that integrate OpenPGP operations directly into Python workflows.
- Verify detached signatures against large files without loading the entire file into memory.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PySequoia provides OpenPGP encryption, decryption, signing, and verification operations in Python by wrapping the Sequoia PGP library, following the IETF standardized protocol.
Yes, if you need OpenPGP operations in Python and can tolerate the API stability caveat. The library is actively maintained, has no Python dependencies, covers most common platforms with prebuilt wheels, and carries no known vulnerabilities. The permissive Apache-2.0 license is unrestrictive. Install friction is moderate but manageable for standard architectures.
Install
pysequoia on PyPI
pip
pip install pysequoiauv
uv add pysequoiapoetry
poetry add pysequoiaInstalling pysequoia
Before you install
Medium install friction due to compiled Rust components; prebuilt wheels cover common architectures (x86_64, ARM, PowerPC, s390x on Linux/macOS/Windows), but unsupported combinations require a Rust toolchain. Actively maintained with recent releases.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects that can comply with attribution requirements.
Quickstart
pip install pysequoia
from pysequoia import Cert, sign, verify
# Load a signing key and sign data
cert = Cert.from_file("key.asc")
signed = sign(cert.secrets.signer(), b"data to sign")
# Verify signed data
result = verify(signed, lambda key_ids: [cert])
print(result.bytes)
Requires Python 3.7+. Prebuilt wheels available for common platforms; other architectures need Rust toolchain installed.
Verify before relying
- Whether the API stability warning ('not stable') affects production use or is limited to minor breaking changes.
- Performance characteristics for large file encryption/decryption relative to other OpenPGP libraries.
- Compatibility with keys generated by GnuPG or other OpenPGP implementations beyond the documented test fixtures.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 92 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 116,431/month — #12,204 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pysequoia-0.1.34-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pysequoia-0.1.34-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pysequoia-0.1.34-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; pysequoia-0.1.34-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; pysequoia-0.1.34-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pysequoia-0.1.34-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; pysequoia-0.1.34-cp310-cp310-musllinux_1_2_aarch64.whl; pysequoia-0.1.34-cp310-cp310-musllinux_1_2_armv7l.whl; pysequoia-0.1.34-cp310-cp310-musllinux_1_2_i686.whl; pysequoia-0.1.34-cp310-cp310-musllinux_1_2_x86_64.whl; pysequoia-0.1.34-cp310-cp310-win_amd64.whl; pysequoia-0.1.34-cp311-cp311-macosx_10_12_x86_64.whl; pysequoia-0.1.34-cp311-cp311-macosx_11_0_arm64.whl; pysequoia-0.1.34-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; pysequoia-0.1.34-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; pysequoia-0.1.34-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; pysequoia-0.1.34-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; pysequoia-0.1.34-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pysequoia-0.1.34-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; pysequoia-0.1.34-cp311-cp311-musllinux_1_2_aarch64.whl
Keywords: openpgp, pgp, gpg, gnupg, sequoia
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
PGPyPGPy implements OpenPGP (RFC 4880) in pure…
permissive · top 5,000 on PyPI
PGPy13PGPy13 is a Python library for OpenPGP…
permissive · top 15,000 on PyPI
gnupgA Python wrapper around GnuPG that lets you…
copyleft · top 5,000 on PyPI
python-gnupgProvides Python bindings to GnuPG for key…
permissive · top 5,000 on PyPI
endesiveEndesive signs and verifies digital signatures…
unclear · top 15,000 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pysetoPySETO implements PASETO (Platform-Agnostic…
permissive · top 15,000 on PyPI
pywidevineImplements Widevine Content Decryption Module…
copyleft · top 15,000 on PyPI
cryptoProvides command-line tools to encrypt and…
permissive · top 5,000 on PyPI
eciespyEncrypts and decrypts data using Elliptic Curve…
permissive · top 15,000 on PyPI