vsajip / python-gnupg

A Python API for the GNU Privacy Guard (GnuPG). Encrypt, decrypt, sign and verify your data using Python! N.B. This repository has been migrated from Mercurial on 2019-11-16, so references to commits before this date will refer to the Mercurial source and not this Git repository. The migration is marked by a commit that adds a .gitignore file.
https://docs.red-dove.com/python-gnupg/
Other
106 stars 29 forks source link
encryption-decryption gnupg python signing verification

|badge1| |badge2| |badge3|

.. |badge1| image:: https://img.shields.io/github/actions/workflow/status/vsajip/python-gnupg/python-package.yml :alt: GitHub test status

.. |badge2| image:: https://img.shields.io/codecov/c/github/vsajip/python-gnupg :target: https://app.codecov.io/gh/vsajip/python-gnupg :alt: GitHub coverage status

.. |badge3| image:: https://img.shields.io/pypi/v/python-gnupg :target: https://pypi.org/project/python-gnupg/ :alt: PyPI package

What is it?

The GNU Privacy Guard (gpg, or gpg.exe on Windows) is a command-line program which provides support for programmatic access via spawning a separate process to run it and then communicating with that process from your program.

This project, python-gnupg, implements a Python library which takes care of the internal details and allows its users to generate and manage keys, encrypt and decrypt data, and sign and verify messages.

Installation

Installing from PyPI

You can install this package from the Python Package Index (pyPI) by running::

pip install python-gnupg

.. important:: There is at least one fork of this project, which was apparently created because an earlier version of this software used the subprocess module with shell=True, making it vulnerable to shell injection. This is no longer the case.

Forks may not be drop-in compatible with this software, so take care to use the correct version, as indicated in the pip install command above.

Installing from a source distribution archive

To install this package from a source distribution archive, do the following:

  1. Extract all the files in the distribution archive to some directory on your system.
  2. In that directory, run pip install ., referencing a suitable pip (e.g. one from a specific venv which you want to install to).
  3. Optionally, run python test_gnupg.py to ensure that the package is working as expected.

Credits

The present incarnation, based on the earlier versions, uses the subprocess module and so works on Windows as well as Unix/Linux platforms. It's not, however, 100% backwards-compatible with earlier incarnations.

Change log

.. note:: GCnn refers to an issue nn on Google Code.

0.5.4 (future)

Released: Not yet

0.5.3

Released: 2024-09-20

0.5.2

Released: 2023-12-12

0.5.1

Released: 2023-07-22

0.5.0

Released: 2022-08-23

0.4.9

Released: 2022-05-20

0.4.8

Released: 2021-11-24

0.4.7

Released: 2021-03-11

0.4.6

Released: 2020-04-17

Support for Python versions 3.5 and under is discontinued, except for Python 2.7.

0.4.5

Released: 2019-08-12

0.4.4

Released: 2019-01-24

0.4.3

Released: 2018-06-13

0.4.2

Released: 2018-03-28

0.4.1

Released: 2017-07-06

0.4.0

Released: 2017-01-29

0.3.9

Released: 2016-09-10

0.3.8

Released: 2015-09-24

0.3.7

Released: 2014-12-07

Signed with PGP key: Vinay Sajip (CODE SIGNING KEY) vinay_sajip@yahoo.co.uk

Key Fingerprint : CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

0.3.6

Released: 2014-02-05

0.3.5

Released: 2013-08-30

0.3.4

Released: 2013-06-05

0.3.3

Released: 2013-03-11

0.3.2

Released: 2013-01-17

0.3.1

Released: 2012-09-01

0.3.0

Released: 2012-05-12

0.2.9

Released: 2012-03-29

0.2.8

Released: 2011-09-02

0.2.7

Released: 2011-04-10

0.2.6

Released: 2011-01-25

0.2.5

Released: 2010-10-13

0.2.4

Released: 2010-03-01

0.2.3

Released: 2010-01-07

0.2.2

Released: 2009-10-06

0.2.1

Released: 2009-08-07

0.2.0

Released: 2009-07-16

0.1.0

Released: 2009-07-04