skillfed

PGPy13

Pretty Good Privacy for Python (temporary fork for py3.13 compatability)

pgpy13 v0.6.1rc1 139.2K downloads/30d#11,305 on PyPI4
Permissive license BSD-3-Clause AGING released

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 pgpy13

uv

uv add pgpy13

poetry

poetry add pgpy13

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: SecurityTopic :: Security :: CryptographyTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

OpenPGP encryption PythonPGP signature verificationGPG compatible libraryRSA ECDSA signingmessage encryption decryptionpretty good privacy Pythoncryptographic key management
pgp-openpgpcryptography-forkpy3.13-compat

More Libraries packages