PGPy13
Pretty Good Privacy for Python (temporary fork for py3.13 compatability)
What it is and what it does
PGPy13 is a temporary fork of PGPy that adds Python 3.13 compatibility and updates cryptography library requirements to v38 or higher. It implements the OpenPGP standard (RFC 4880) in pure Python, allowing you to load, create, and verify PGP keys and signatures in both ASCII-armored and binary formats, and to encrypt or decrypt messages using RSA and ECDH algorithms.
The fork was created because the upstream project broke under Python 3.13 due to removal of the imghdr library from the standard library. Support for Python versions below 3.9 has been dropped. The maintainer explicitly states this is temporary and will be discontinued once the upstream project resolves its issues and releases a new version.
Use it for:
- Encrypt and decrypt messages in Python applications that need to interoperate with PGP/GPG systems.
- Create and verify digital signatures on documents or data using RSA, DSA, or ECDSA algorithms.
- Load and parse existing PGP public and private keys from files or ASCII-armored text.
- Implement OpenPGP-compliant cryptographic workflows in Python 3.9+ environments without external GPG binaries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PGPy13 is a Python library for OpenPGP encryption, decryption, and digital signature operations conforming to RFC 4880, with support for RSA, DSA, and ECDSA signatures and RSA/ECDH encryption.
Yes, but with caution. PGPy13 is suitable for Python 3.13 projects that need OpenPGP functionality. However, be aware this is a temporary fork with minimal ongoing support—the maintainer will not accept pull requests or bug reports. If you can use the upstream project or have flexibility to wait for its next release, prefer that instead.
Install
pgpy13 on PyPI
pip
pip install pgpy13uv
uv add pgpy13poetry
poetry add pgpy13Installing PGPy13
Before you install
Low install friction with only two runtime dependencies. However, this is an aging fork with minimal maintenance activity (4 repository stars, last commit 2025-03-01). The fork exists solely to patch Python 3.13 compatibility and cryptography v38 or higher requirements; upstream remains unmaintained.
License in practice
BSD-3-Clause is permissive and imposes minimal restrictions on use or redistribution. You may use this package in commercial or proprietary projects with only the requirement to include the license notice.
Quickstart
pip install PGPy13
from pgpy import PGPKey
key = PGPKey.from_file('key.asc')
Requires Python >= 3.9; cryptography v38 or higher and pyasn1 must be installed.
Verify before relying
- Whether upstream issue #462 has been resolved and a new official release issued, making this fork obsolete.
- Real-world security audit status of the underlying codebase for cryptographic correctness.
- Whether the fork maintainer will continue to patch for future Python versions.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — cryptography, pyasn1 |
| Maintenance | aging — 531 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 139,175/month — #11,305 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pgpy13-0.6.1rc1-py3-none-any.whl
Keywords: OpenPGP, PGP, Pretty Good Privacy, GPG, GnuPG, openpgp, pgp, gnupg, gpg, encryption, signature
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
python-gnupgProvides Python bindings to GnuPG for key…
permissive · top 5,000 on PyPI
pysequoiaPySequoia provides OpenPGP encryption,…
permissive · top 15,000 on PyPI
securesystemslibSecuresystemslib provides a cryptography…
permissive · top 5,000 on PyPI
gnupgA Python wrapper around GnuPG that lets you…
copyleft · top 5,000 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyHankopyHanko is a Python library for adding,…
permissive · top 5,000 on PyPI
lightdsaLightDSA provides digital signature generation…
permissive · top 15,000 on PyPI
pyas2libBuilds and parses AS2 protocol messages with…
copyleft · top 15,000 on PyPI
python-pkcs11Provides a high-level Python interface to…
permissive · top 15,000 on PyPI