Flask extension for work with GnuPG
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-GnuPG-1.0.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for Flask_GnuPG-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53228241492ad2ef2e2d092c689d324190c61bf67f7f43a7002670f976ec56ba |
|
MD5 | 30ffa397a58037457a34c5c4a333958d |
|
BLAKE2b-256 | 726ee8fc8f989eacb2cdfa31f0883f58f602acae2e38690f313c22bd009bf7fa |