Registry / security / pysequoia

pysequoia

JSON →
library0.1.34pypypi✓ verified 82d ago

pysequoia is a Python binding for the Sequoia-PGP library, providing OpenPGP functionality such as encryption, decryption, signing, and verification. Version 0.1.34 requires Python 3.7+ and wraps Sequoia's low-level FFI with a Pythonic API. Release cadence is irregular, driven by upstream Sequoia changes.

pip install pysequoia
INSTALL
IMPORT
SIG · PYSEQUOIA
P
pysequoia
securitypythonv0.1.34
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

armor
from pysequoia import armor
from pysequoia import sequoia_openpgp
encrypt
from pysequoia import encrypt
decrypt
from pysequoia import decrypt

Generate an OpenPGP key pair using Sequoia-PGP via pysequoia.

import os from pysequoia import sequoia_openpgp as sop # Generate a key pair key = sop.generate_key(b'Alice <alice@example.org>') # Export public key public_key = sop.extract_public_key(key) print(public_key.decode())
Debug
Known issues
breakingThe pysequoia API is not stable; functions and arguments can change between minor versions without deprecation. Pin the exact version in requirements.
fix
Use 'pysequoia==0.1.34' in your requirements.txt.
affects: all
gotchaAll cryptographic operations (encrypt, decrypt, sign, verify) return bytes, not strings. Attempting to use them as strings may cause unexpected behavior.
fix
Decode bytes to a string if necessary: result = sop.encrypt(...).decode('utf-8').
affects: all
gotchaThe library relies on Sequoia-PGP's system-installed binary; on some platforms (e.g., Alpine Linux) the shared library may not be found, leading to an ImportError.
fix
Ensure the Sequoia-PGP system package (libsequoia-openpgp) is installed. On Debian/Ubuntu: apt install libsequoia-openpgp-ffi-dev.
affects: all
deprecatedFunction 'generate_key' has been renamed to 'generate_key_pair' in the development branch. The old name will be removed in a future release.
fix
Use 'generate_key_pair' instead of 'generate_key'.
affects: <=0.1.34
breakingThe module name 'sequoia_openpgp' (the high-level wrapper) may be broken out into a separate package in future. Imports from 'pysequoia.sequoia_openpgp' may change.
fix
Monitor the repository for announcements about import path changes.
affects: future
Upgrade
Version history
0.1.34latest on PyPI · released May 14, 2026
Audit
Dependencies
cffirequiredRequired for C foreign function interface to Sequoia
Agent activity
21 hits · last 30 days
node
20
Resources
pysequoia — pip install pysequoia · libregistry