gnupg
A Python wrapper for GnuPG
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is stable and in the top 5000 PyPI downloads, with no known vulnerabilities. However, it is dormant—last release was 2017-09-06—so it may not support modern Python versions or recent GnuPG features. Install it if you need GPG integration in a Python 2 or early Python 3 codebase and can tolerate lack of active maintenance.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- GnuPG binary must be installed and accessible on the system (e.g., /usr/bin/gpg on Linux/macOS).
- High install friction: no runtime dependencies but requires a working GnuPG binary on the system.
- Maintenance is dormant—last release was 2017-09-06, over 3264 days ago, though the repository remains active with a recent commit on 2024-08-01.
License · maintenance · safety
GPLv3+ (copyleft) — Licensed under GPLv3+, a copyleft license. Any application that links this library must also be distributed under a compatible open-source license or obtain an exception.
last release 2017-09-06 (3264 days) · last repo commit 2024-08-01 · 424 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,074,211 downloads/mo, #3,318 on PyPI
Alternatives
Verify before relying
pip install gnupg
from gnupg import GPG
gpg = GPG(binary='/usr/bin/gpg', homedir='./keys')
message = "test"
encrypted = str(gpg.encrypt(message, recipient_key_id))
decrypted = str(gpg.decrypt(encrypted))- Whether patches for shell injection vulnerabilities cover all supported Python versions.
- Current compatibility with modern GnuPG versions and Python 3.x releases beyond 3.4.
- Whether dormant maintenance affects security patches or bug fixes going forward.
What it is and what it does
gnupg is a Python wrapper around the GnuPG command-line tool, allowing you to perform cryptographic operations—key generation, encryption, decryption, and signing—from Python code. It is a rewrite of an earlier library that fixed shell injection vulnerabilities caused by unsanitized subprocess calls.
The package provides a GPG class that manages a local keyring and communicates with the GnuPG binary via subprocess. You instantiate it with paths to your keyring files and GnuPG binary, then call methods like gen_key(), encrypt(), and decrypt() to perform operations. It has no runtime Python dependencies but requires GnuPG to be installed on the system.
Use it for
- Automate GPG key generation and management in Python applications without manual shell scripting.
- Encrypt sensitive data in a Python service before storage or transmission.
- Decrypt files or messages signed by external parties as part of a larger workflow.
- Build a Python-based key distribution system that relies on GPG trust models.
- Integrate GPG operations into CI/CD pipelines or batch processing jobs.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is stable and in the top 5000 PyPI downloads, with no known vulnerabilities. However, it is dormant—last release was 2017-09-06—so it may not support modern Python versions or recent GnuPG features. Install it if you need GPG integration in a Python 2 or early Python 3 codebase and can tolerate lack of active maintenance.
Install
gnupg on PyPI
Before you install
High install friction: no runtime dependencies but requires a working GnuPG binary on the system. Maintenance is dormant—last release was 2017-09-06, over 3264 days ago, though the repository remains active with a recent commit on 2024-08-01.
GnuPG binary must be installed and accessible on the system (e.g., /usr/bin/gpg on Linux/macOS).
License in practice
Licensed under GPLv3+, a copyleft license. Any application that links this library must also be distributed under a compatible open-source license or obtain an exception.
Quickstart
pip install gnupg
from gnupg import GPG
gpg = GPG(binary='/usr/bin/gpg', homedir='./keys')
message = "test"
encrypted = str(gpg.encrypt(message, recipient_key_id))
decrypted = str(gpg.decrypt(encrypted))
Verify before relying
- Whether patches for shell injection vulnerabilities cover all supported Python versions.
- Current compatibility with modern GnuPG versions and Python 3.x releases beyond 3.4.
- Whether dormant maintenance affects security patches or bug fixes going forward.
Package facts
| License | GPLv3+ copyleft |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Dormant 3,264 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,074,211 / month, #3,318 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: AndroidOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: BSDOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Security :: CryptographyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities |
Evidence: gnupg-2.3.1-py2.7.egg; gnupg-2.3.1-py3.4.egg; gnupg-2.3.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gnupg python wrapper”
- gnupgA Python wrapper around GnuPG that lets you generate keys, encrypt,…
- python-gnupgProvides Python bindings to GnuPG for key management, encryption,…
- pysequoiaPySequoia provides OpenPGP encryption, decryption, signing, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also PGPy · python-gnupg · PGPy13 · pysequoia · crypto · sopsy · eciespy · pyrage · pyAesCrypt · pyscrypt