Skip to main content

Flask extension for work with GnuPG

Project description

https://img.shields.io/pypi/v/flask-gnupg.svg https://img.shields.io/pypi/l/flask-gnupg.svg https://img.shields.io/pypi/pyversions/flask-gnupg.svg https://img.shields.io/pypi/wheel/flask-gnupg.svg https://img.shields.io/pypi/status/flask-gnupg.svg https://travis-ci.org/EldarAliiev/flask-gnupg.svg?branch=master https://coveralls.io/repos/github/EldarAliiev/flask-gnupg/badge.svg?branch=master https://img.shields.io/github/contributors/EldarAliiev/flask-gnupg.svg

Flask extension for work with GnuPG based on python-gnupg.

https://github.com/EldarAliiev/flask-gnupg

Install:

$ git clone https://github.com/EldarAliiev/flask-gnupg.git
$ cd flask-gnupg
$ python setup.py install

or with pip:

$ pip install Flask-GnuPG

Usage example:

Set up configuration in your Flask application:

  • GPG_HOME_DIR : default ‘~/.gnupg’
  • GPG_BINARY : default ‘gpg2’
  • GPG_KEYRING : default None
  • GPG_SECRET_KEYRING : default None
  • GPG_KEY_ID : default ‘’
  • GPG_PASSPHRASE : default ‘’

Create the application and initialize GnuPG instance:

from flask import Flask
from flask_gnupg import GnuPG

app = Flask(__name__)
gpg = GnuPG(app)

Or you can set up GnuPG instance later:

gpg = GnuPG()

app = Flask(__name__)
gpg.init_app(app)

Then you can use GnuPG engine in your views:

@app.route('/')
def index():
    keys_list = gpg.list_keys()
    return keys_list

For details about all allowed methods read the docs of python-gnupg library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-GnuPG, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size Flask_GnuPG-1.0.0-py3-none-any.whl (4.8 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size Flask-GnuPG-1.0.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page