skillfed

pysequoia

Provides OpenPGP facilities using Sequoia-PGP library

pysequoia v0.1.34 116.4K downloads/30d#12,204 on PyPI20
Permissive license Apache-2.0 Active released

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 pysequoia

uv

uv add pysequoia

poetry

poetry add pysequoia

Installing 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

Development Status :: 4 - BetaLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

openpgp encryption pythonpgp signing verificationgnupg alternative librarysequoia pgp wrapperdigital signatures pythonpgp decrypt encryptopenssl pgp alternative
cryptographypgp-openpgprust-binding

More Libraries packages